query-ada940840ecb7f47d34893a924facd30
Unique value constraint report for P244: report listing each item SELECT DISTINCT ?item1 ?item1Label ?item2 ?item2Label ?value { ?item1 wdt:P244 ?value . #use different predicate for a different identifier ?item2 wdt:P244 ?value . #use same predicate as previous statement ?item1 wdt:P31 wd:Q5 . ?item2 wdt:P31 wd:Q5 . FILTER( ?item1 != ?item2 && STR( ?item1 ) < STR( ?item2 ) ) . SERVICE wikibase:label { bd:serviceParam wikibase:language "en" } . } LIMIT 1000
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#Unique value constraint report for P244: report listing each item
SELECT DISTINCT ?item1 ?item1Label ?item2 ?item2Label ?value
{
?item1 wdt:P244 ?value . #use different predicate for a different identifier
?item2 wdt:P244 ?value . #use same predicate as previous statement
?item1 wdt:P31 wd:Q5 .
?item2 wdt:P31 wd:Q5 .
FILTER( ?item1 != ?item2 && STR( ?item1 ) < STR( ?item2 ) ) .
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" } .
}
LIMIT 1000
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
c5(["bd:serviceParam"]):::iri
c3(["wd:Q5"]):::iri
c7(["en"]):::literal
f0[["?item1 != ?item2str(?item1) < str(?item2)"]]
f0 --> v1
f0 --> v2
v1 --"wdt:P244"--> v3
v2 --"wdt:P244"--> v3
v1 --"wdt:P31"--> c3
v2 --"wdt:P31"--> c3
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c5 --"wikibase:language"--> c7
end