@prefix this: <https://w3id.org/np/RAo3A9JM4Yna0podxPPCucSFV0d_oFHk8EcVfhRvVjRHk> .
@prefix sub: <https://w3id.org/np/RAo3A9JM4Yna0podxPPCucSFV0d_oFHk8EcVfhRvVjRHk/> .
@prefix np: <http://www.nanopub.org/nschema#> .
@prefix dct: <http://purl.org/dc/terms/> .
@prefix nt: <https://w3id.org/np/o/ntemplate/> .
@prefix npx: <http://purl.org/nanopub/x/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix orcid: <https://orcid.org/> .
@prefix prov: <http://www.w3.org/ns/prov#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
sub:Head {
  this: np:hasAssertion sub:assertion ;
    np:hasProvenance sub:provenance ;
    np:hasPublicationInfo sub:pubinfo ;
    a np:Nanopublication .
}
sub:assertion {
  sub:get-active-user-count-in-time-period dct:description "This query returns the number of active users, separated by whether they are an ORCID or not, for the given time period (start and end date)." ;
    dct:license <http://www.apache.org/licenses/LICENSE-2.0> ;
    a <https://w3id.org/kpxl/grlc/grlc-query> ;
    rdfs:label "Get active user counts in time period" ;
    <https://w3id.org/kpxl/grlc/endpoint> <https://w3id.org/np/l/nanopub-query-1.1/repo/full> ;
    <https://w3id.org/kpxl/grlc/sparql> """prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
prefix np: <http://www.nanopub.org/nschema#>
prefix npa: <http://purl.org/nanopub/admin/>
prefix npx: <http://purl.org/nanopub/x/>
prefix xsd: <http://www.w3.org/2001/XMLSchema#>
prefix dct: <http://purl.org/dc/terms/>
prefix prov: <http://www.w3.org/ns/prov#>
prefix foaf: <http://xmlns.com/foaf/0.1/>

select (count(distinct ?userid) as ?userCount) ?isOrcid where {
  graph npa:graph {
    ?np npa:hasValidSignatureForPublicKey ?pubkey .
    ?np dct:creator ?userid .
    ?np dct:created ?date .
  }
  filter not exists {
    graph npa:graph { ?np npa:hasSubIri ?userid . }
  }
  bind(substr(str(?date), 1, 10) as ?dateStr)
  filter(?dateStr >= ?_startDate)
  filter(?dateStr <= ?_endDate)
  bind(strstarts(str(?userid), \"https://orcid.org/\") as ?isOrcid)
}
group by ?isOrcid
order by ?isOrcid""" .
}
sub:provenance {
  sub:assertion prov:wasAttributedTo orcid:0000-0002-1267-0234 .
}
sub:pubinfo {
  orcid:0000-0002-1267-0234 foaf:name "Tobias Kuhn" .
  this: dct:created "2026-03-19T08:56:26.182Z"^^xsd:dateTime ;
    dct:creator orcid:0000-0002-1267-0234 ;
    dct:license <https://creativecommons.org/publicdomain/zero/1.0/> ;
    npx:embeds sub:get-active-user-count-in-time-period ;
    npx:wasCreatedAt <https://nanodash.knowledgepixels.com/> ;
    nt:wasCreatedFromProvenanceTemplate <https://w3id.org/np/RA7lSq6MuK_TIC6JMSHvLtee3lpLoZDOqLJCLXevnrPoU> ;
    nt:wasCreatedFromPubinfoTemplate <https://w3id.org/np/RACJ58Gvyn91LqCKIO9zu1eijDQIeEff28iyDrJgjSJF8> , <https://w3id.org/np/RAukAcWHRDlkqxk7H2XNSegc1WnHI569INvNr-xdptDGI> ;
    nt:wasCreatedFromTemplate <https://w3id.org/np/RAEFAt-QcFK0ZhqfvlsmS10BnzGJA0xwOICZXkO-ai87k> .
  sub:sig npx:hasAlgorithm "RSA" ;
    npx:hasPublicKey "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQD4Wj537OijfOWVtsHMznuXKISqBhtGDQZfdO6pbb4hg9EHMcUFGTLbWaPrP783PHv8HMAAPjvEkHLaOHMIknqhaIa5236lfBO3r+ljVdYBElBcLvROmwG+ZGtmPNZf7lMhI15xf5TfoaSa84AFRd5J2EXekK6PhaFQhRm1IpSYtwIDAQAB" ;
    npx:hasSignature "N5X1rEUwF8xArJwiz189S3/P3NpRh/Xp/mDlQxo4SQ2AoKrISUvbeniNLPSEB84NdO6PHh1XMHOdpZIoQvOVxAcE5WRXLs10eyAJ3YYTI77PnkAFNavsknUoHA/UNv6Vt56H4863T5BqLRbNS3CA2vvhPVtBG0PeDWLVe6kFw6k=" ;
    npx:hasSignatureTarget this: ;
    npx:signedBy orcid:0000-0002-1267-0234 .
}