query-f1ef41aabccab7be3707d5c714dfb5a3

rq turtle/ttl

Položky s více ID, s totožnými vymezeními

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
SELECT ?item ?vymezeni ?vymezeni2 ?vymezeni3 (group_concat(?nkcr; separator=", ") as ?nkcr_ids) (COUNT(?nkcr) as ?itemcount) 

WHERE {
   {

SELECT * WHERE {
  ?item p:P691 ?statement .
  ?statement ps:P691 ?nkcr ; wikibase:rank ?rank filter(?rank != wikibase:DeprecatedRank).
} }  optional {?statement pq:P1810 ?vymezeni .}
  optional {?statement pq:P407 ?vymezeni2 .}
  optional {?statement pq:P518 ?vymezeni3 .}
  minus {?statement pq:P3831 wd:Q1263068 .}
 } 

GROUP BY ?item ?vymezeni ?vymezeni2 ?vymezeni3
HAVING(?itemcount>1)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?item"):::projected v10("?itemcount") v5("?nkcr"):::projected v9("?nkcr_ids") v2("?rank") v4("?statement") v6("?vymezeni"):::projected v7("?vymezeni2"):::projected v8("?vymezeni3"):::projected c10(["wd:Q1263068"]):::iri f0[["?itemcount > '1^^xsd:integer'"]] f0 --> v10 f1[["?rank != 'wikibase:DeprecatedRank'"]] f1 --> v2 v3 --"p:P691"--> v4 v4 --"p:statement/P691"--> v5 v4 --"wikibase:rank"--> v2 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v4 -."p:qualifier/P1810".-> v6 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v4 -."p:qualifier/P407".-> v7 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v4 -."p:qualifier/P518".-> v8 end subgraph minus2["MINUS"] style minus2 stroke-width:6px,fill:pink,stroke:red; v4 --"p:qualifier/P3831"--> c10 end bind5[/"?nkcr"/] v5 --o bind5 bind5 --as--o v9 bind6[/"count(?nkcr)"/] v5 --o bind6 bind6 --as--o v10