Get quarterly active organic user count
Full identifier: https://w3id.org/np/RA2TCnrqX8lwE16g8eu4QvvZalBIR6QCrCPx9B40V7W3s
Nanopublication
Get quarterly active organic user count
grlc-query
This is a local identifier minted within the nanopublication.
https://w3id.org/np/RA2TCnrqX8...erly-active-organic-user-count
https://w3id.org/kpxl/grlc/sparql
has the query
(this is a literal)
"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 ?quarter (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 . }
}
filter(str(?date) > "2022")
filter(str(?date) < "2023-10-03" || str(?date) > "2023-10-12")
filter(str(?date) < "2024-09-27" || str(?date) > "2024-10-07")
bind(substr(str(?date), 0, 8) as ?month)
bind(replace(?month, "-0[1-3]$", "-Q1") as ?quarter_temp1)
bind(replace(?quarter_temp1, "-0[4-6]$", "-Q2") as ?quarter_temp2)
bind(replace(?quarter_temp2, "-0[7-9]$", "-Q3") as ?quarter_temp3)
bind(replace(?quarter_temp3, "-1[0-9]$", "-Q4") as ?quarter)
}
group by ?quarter
order by desc(?quarter)"
.
Tobias Kuhn,
12 Sep 2025, 15:04:06 UTC
References