query-fe28d69be6f785ec221d57e887b63b6a
TODO
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#>
SELECT DISTINCT ?item ?itemLabel ?P279 ?P279Label ?P279_2 ?P279_2Label
WHERE {
SERVICE bd:slice {
?item wdt:P31 wd:Q113145171.
bd:serviceParam bd:slice.offset 0 . # Start at item number (not to be confused with QID)
bd:serviceParam bd:slice.limit 100 . # List this many items
}
?item wdt:P279 ?P279.
?item wdt:P279 ?P279_2.
filter(str(?P279) != str(?P279_2))
?P279 wdt:P279* ?P279_2 .
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?P279"):::projected
v2("?P279_2"):::projected
v3("?item"):::projected
c6(["0^^xsd:integer"]):::literal
c8(["100^^xsd:integer"]):::literal
c4(["bd:serviceParam"]):::iri
c3(["wd:Q113145171"]):::iri
c12(["en"]):::literal
f0[["str(?P279) != str(?P279_2)"]]
f0 --> v1
f0 --> v2
subgraph s1["http://www.bigdata.com/rdf#slice"]
style s1 stroke-width:4px;
v3 --"wdt:P31"--> c3
c4 --"bd:slice.offset"--> c6
c4 --"bd:slice.limit"--> c8
end
v3 --"wdt:P279"--> v1
v3 --"wdt:P279"--> v2
v1 --"wdt:P279"--> v2
subgraph s2["http://wikiba.se/ontology#label"]
style s2 stroke-width:4px;
c4 --"wikibase:language"--> c12
end