query-4c531df7a58616f4e9cd373dbb4fbe76

rq turtle/ttl

Propertiestime period (P2348)collection (P195)end time (P582)

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX schema: <http://schema.org/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?period ?periodLabel ?periodDescription (COUNT(?q) AS ?mcount)
WHERE {
?q wdt:P2348 ?period.
?q p:P195 ?s. ?s ps:P195 ?collection . MINUS {?s pq:P582 []}.
  SERVICE wikibase:label {
    bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en".
  }
 OPTIONAL{?enwp schema:about ?collection; schema:isPartOf <https://en.wikipedia.org/> }
}
GROUP BY ?period ?periodLabel ?periodDescription
ORDER BY DESC(?mcount)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v5("?collection") v6("?enwp") v7("?mcount") v3("?period"):::projected v2("?q"):::projected v4("?s") a1((" ")) c11([https://en.wikipedia.org/]):::iri c6(["bd:serviceParam"]):::iri c8(["#91;AUTO_LANGUAGE#93;,en"]):::literal v2 --"p:direct/P2348"--> v3 v2 --"p:P195"--> v4 v4 --"p:statement/P195"--> v5 subgraph minus0["MINUS"] style minus0 stroke-width:6px,fill:pink,stroke:red; v4 --"p:qualifier/P582"--> a1 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c6 --"wikibase:language"--> c8 end subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v6 -."schema:about".-> v5 v6 --"schema:isPartOf"--> c11 end bind2[/"count(?q)"/] v2 --o bind2 bind2 --as--o v7