@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: np:hasAssertion sub:assertion; np:hasProvenance sub:provenance; np:hasPublicationInfo sub:pubinfo; a np:Nanopublication . } sub:assertion { sub:get-monthly-type-overview-by-pubkeys dct:description "This query returns an monthly overview of published nanopublications by types for the past 12 months for the given pubkey hashes."; dct:license ; a ; rdfs:label "Get type overview of monthly nanopubs by pubkeys"; ; """prefix rdfs: prefix np: prefix npa: prefix npx: prefix xsd: prefix dct: select ?type ?month ?npCount ?npCountType where { { select ?type ?month (count(?np) as ?npCount) where { graph npa:graph { values ?_pubkey_multi {} ?np npa:hasValidSignatureForPublicKeyHash ?_pubkey_multi . filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKeyHash ?_pubkey_multi . } ?np dct:created ?date . ?np npx:hasNanopubType ?type . bind(substr(str(?date), 0, 8) as ?month) bind(now() as ?now) bind(concat(str(year(?now)), '-', if(month(?now)>9,'','0'), str(month(?now))) as ?lastMonth) bind(concat(str(year(?now)-1), '-', if(month(?now)>9,'','0'), str(month(?now))) as ?firstMonth) filter(?month > ?firstMonth && ?month <= ?lastMonth) } } group by ?type ?month order by ?type desc(?month) } { select ?type (count(?np) as ?npCountType) where { graph npa:graph { values ?_pubkey_multi {} ?np npa:hasValidSignatureForPublicKeyHash ?_pubkey_multi . filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKeyHash ?_pubkey_multi . } ?np dct:created ?date . ?np npx:hasNanopubType ?type . bind(substr(str(?date), 0, 8) as ?month) bind(now() as ?now) bind(concat(str(year(?now)), '-', if(month(?now)>9,'','0'), str(month(?now))) as ?lastMonth) bind(concat(str(year(?now)-1), '-', if(month(?now)>9,'','0'), str(month(?now))) as ?firstMonth) filter(?month > ?firstMonth && ?month <= ?lastMonth) } } group by ?type order by desc(?npCountType) } } order by desc(?npCountType) ?type desc(?month)""" . } 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-10-02T07:36:08.194Z"^^xsd:dateTime; dct:creator orcid:0000-0002-1267-0234; dct:license ; npx:embeds sub:get-monthly-type-overview-by-pubkeys; npx:wasCreatedAt ; prov:wasDerivedFrom ; nt:wasCreatedFromProvenanceTemplate ns1:RANwQa4ICWS5SOjw7gp99nBpXBasapwtZF1fIM3H2gYTM; nt:wasCreatedFromPubinfoTemplate , , ; nt:wasCreatedFromTemplate . sub:sig npx:hasAlgorithm "RSA"; npx:hasPublicKey "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQD4Wj537OijfOWVtsHMznuXKISqBhtGDQZfdO6pbb4hg9EHMcUFGTLbWaPrP783PHv8HMAAPjvEkHLaOHMIknqhaIa5236lfBO3r+ljVdYBElBcLvROmwG+ZGtmPNZf7lMhI15xf5TfoaSa84AFRd5J2EXekK6PhaFQhRm1IpSYtwIDAQAB"; npx:hasSignature "tCkQ/wAjH8Ls0RUhGKhSQp1yspcSjlESQvp6fph5Yd7HP+9nmB+OD8YgSR1sORrF2Nwqy0GofzMZajguwz0mpcT5lXqRWJr8QODZ9jlz5am3fWSi+uudXZGFhphvcoHxPmHxsEy/29q2gtzbTAW5Sb0MlWf8ghQQXc6bjN0oAmI="; npx:hasSignatureTarget this:; npx:signedBy orcid:0000-0002-1267-0234 . }