sub:assertion {
sub:get-RORaffiliated-datasetCount2 dct:description "This query returns a count of datasets per funder for those affiliated with a ROR-registered research organization." ;
dct:license <
http://www.apache.org/licenses/LICENSE-2.0> ;
a <
https://w3id.org/kpxl/grlc/grlc-query> ;
rdfs:label "Get ROR-affiliated dataset count per funder" ;
<
https://w3id.org/kpxl/grlc/endpoint> <
https://w3id.org/np/l/nanopub-query-1.1/repo/full> ;
<
https://w3id.org/kpxl/grlc/sparql> """PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX schema: <https://schema.org/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX dct: <http://purl.org/dc/terms/>
PREFIX np: <http://www.nanopub.org/nschema#>
PREFIX npa: <http://purl.org/nanopub/admin/>
PREFIX npx: <http://purl.org/nanopub/x/>
PREFIX w3: <http://www.w3.org/>
PREFIX w3idf: <https://w3id.org/fair/fip/terms/>
SELECT ?funded_by (COUNT(DISTINCT ?project) AS ?project_count)
WHERE {
GRAPH npa:graph {
?np npa:hasValidSignatureForPublicKey ?pubkey .
FILTER NOT EXISTS {
?npx npx:invalidates ?np ;
npa:hasValidSignatureForPublicKey ?pubkey .
}
?np dct:created ?date .
?np np:hasAssertion ?a .
?np np:hasProvenance ?p .
}
GRAPH ?a {
?project a <https://schema.org/ResearchProject> .
OPTIONAL { ?project schema:funder ?funded_by . }
OPTIONAL { ?project rdfs:label ?project_label . }
  OPTIONAL { ?project  schema:startDate ?start_date . }
}
# GRAPH <http://purl.org/np/RACXDZHEowTYDAzZvdmD0qIGpXZwY5ghMRBBlt6N8Iu5s#assertion> {
# OPTIONAL { ?domain rdfs:label ?domain_label . }
# }
GRAPH ?p {
# ?a prov:wasAttributedTo ?orcid_id .
?a prov:wasAttributedTo ?ror .
FILTER(STRSTARTS(STR(?ror), \"https://ror.org/\"))
}
}
GROUP BY ?funded_by
ORDER BY DESC(?project_count)""" .
}