query-77f1e908db427bd71d0660ec5154f58c
Unique value constraint report for P351: report listing each item
SELECT DISTINCT ?item1 ?item1Label ?item2 ?item2Label ?value {
?item1 wdt:P351 ?value .
?item2 wdt:P351 ?value .
FILTER(?item1 != ?item2 && str(?item1)<str(?item2)) .
SERVICE wikibase:label { bd:serviceParam wikibase:language "en,en" } .
}
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#Unique value constraint report for P351: report listing each item
SELECT DISTINCT ?item1 ?item1Label ?item2 ?item2Label ?value {
?item1 wdt:P351 ?value .
?item2 wdt:P351 ?value .
FILTER(?item1 != ?item2 && str(?item1)<str(?item2)) .
SERVICE wikibase:label { bd:serviceParam wikibase:language "en,en" } .
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?item1"):::projected
v2("?item2"):::projected
v3("?value"):::projected
c3(["bd:serviceParam"]):::iri
c5(["en,en"]):::literal
f0[["?item1 != ?item2str(?item1) < str(?item2)"]]
f0 --> v1
f0 --> v2
v1 --"wdt:P351"--> v3
v2 --"wdt:P351"--> v3
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c3 --"wikibase:language"--> c5
end