query-a46877ffcfcddc99c8103be43f1d065b

rq turtle/ttl

Propertiespart of (P361)collection (P195)end time (P582)

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
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 (COUNT(?obj) AS ?count) ?collection ?collectionLabel ?partofLabel WHERE {
?obj p:P195 ?s.
?s ps:P195 ?collection.
MINUS { ?s pq:P582 [] }
OPTIONAL { ?collection wdt:P361 ?partof }
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
} GROUP BY ?collection ?collectionLabel ?partofLabel
ORDER BY DESC(?count)
LIMIT 100

Query found at

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