@prefix this: . @prefix sub: . @prefix np: . @prefix dct: . @prefix nt: . @prefix npx: . @prefix xsd: . @prefix rdfs: . @prefix orcid: . @prefix ns1: . @prefix prov: . @prefix foaf: . sub:Head { this: a np:Nanopublication; np:hasAssertion sub:assertion; np:hasProvenance sub:provenance; np:hasPublicationInfo sub:pubinfo . } sub:assertion { sub:get-weekly-active-user-count a ; dct:description "Returns the number of active users per (approximate) week."; dct:license ; rdfs:label "Get weekly active user count"; ; """prefix rdfs: prefix np: prefix npa: prefix npx: prefix xsd: prefix dct: prefix prov: prefix foaf: select ?approxweek (substr(str(min(?date)), 0, 11) as ?firstday) (count(distinct ?userid) as ?usercount) where { { graph npa:graph { ?np npa:hasValidSignatureForPublicKey ?pubkey . ?np dct:creator ?userid . ?np dct:created ?date . } } union { graph npa:graph { ?np npa:hasValidSignatureForPublicKey ?pubkey . ?np np:hasAssertion ?assertion . ?np np:hasProvenance ?prov . ?np dct:created ?date . } graph ?prov { ?assertion prov:wasAttributedTo ?userid . } } filter not exists { graph npa:graph { ?np npa:hasSubIri ?userid . } } bind(xsd:integer((year(?date)*365 + month(?date)*365/12 + day(?date)) / 7) as ?approxweek) } group by ?approxweek order by desc(?approxweek)""" . } 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 "2025-11-06T20:22:00.756Z"^^xsd:dateTime; dct:creator orcid:0000-0002-1267-0234; dct:license ; npx:embeds sub:get-weekly-active-user-count; npx:supersedes ; npx:wasCreatedAt ; nt:wasCreatedFromProvenanceTemplate ns1:RANwQa4ICWS5SOjw7gp99nBpXBasapwtZF1fIM3H2gYTM; nt:wasCreatedFromPubinfoTemplate , , ; nt:wasCreatedFromTemplate . sub:sig npx:hasAlgorithm "RSA"; npx:hasPublicKey "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQD4Wj537OijfOWVtsHMznuXKISqBhtGDQZfdO6pbb4hg9EHMcUFGTLbWaPrP783PHv8HMAAPjvEkHLaOHMIknqhaIa5236lfBO3r+ljVdYBElBcLvROmwG+ZGtmPNZf7lMhI15xf5TfoaSa84AFRd5J2EXekK6PhaFQhRm1IpSYtwIDAQAB"; npx:hasSignature "w8wvyqzpWiES2x+6uOxukGg2GaH+Lo4CpwUnuCi12xTulx16uqOXgos3h7IjQQrQXGVaIggukcx03ShlR/XPct1HvAIYOrGYA1L6mPoA/MTUlSytgEP20BrPSr+zum4v85U4ngQ/MUWyjZpBeItkd2D9hKFpmjHpDfH/lWIu6tc="; npx:hasSignatureTarget this:; npx:signedBy orcid:0000-0002-1267-0234 . }