query-c8b3231e799c0d10773a56397e4226f2

rq turtle/ttl

Unique value checker, for P486 SELECT DISTINCT ?item1 ?item1Label ?item2 ?item2Label ?value { ?item1 wdt:P486 ?value . ?item2 wdt:P486 ?value . FILTER( ?item1 != ?item2 && STR( ?item1 ) < STR( ?item2 ) ) . FILTER( STRSTARTS(?value, 'D') ) SERVICE wikibase:label { bd:serviceParam wikibase:language "en" } . } LIMIT 1000

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#Unique value checker, for P486
SELECT DISTINCT ?item1 ?item1Label ?item2 ?item2Label ?value 
{
    ?item1 wdt:P486 ?value .
    ?item2 wdt:P486 ?value .
    FILTER( ?item1 != ?item2 && STR( ?item1 ) < STR( ?item2 ) ) .
    FILTER( STRSTARTS(?value, 'D') )
    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; v2("?item1"):::projected v3("?item2"):::projected v1("?value"):::projected c4(["bd:serviceParam"]):::iri c6(["en"]):::literal f0[["starts-with(?value,'D')"]] f0 --> v1 f1[["?item1 != ?item2str(?item1) < str(?item2)"]] f1 --> v2 f1 --> v3 v2 --"wdt:P486"--> v1 v3 --"wdt:P486"--> v1 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c4 --"wikibase:language"--> c6 end