query-0a51dcaec94179ecde0423ade323e76c
SPARQL query result erroneousTask T210044PhabricatorTracked in
Use at
- https://query.wikidata.org/sparql
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX schema: <http://schema.org/>
PREFIX bd: <http://www.bigdata.com/rdf#>
select ?item ?itemLabel ?sitelinks
where {
{
select distinct ?item
where {
values ?item_class {wd:Q6665249 wd:Q19595175}
?item wdt:P106 ?item_class; wdt:P21 wd:Q6581072; wdt:P31 wd:Q5.
filter not exists {[] schema:about ?item; schema:isPartOf <https://de.wikipedia.org/>}
minus {?item wdt:P106 wd:Q488111 . }
minus {?item wdt:P106 wd:Q852857 . }
}
}
bind(xsd:integer(substr(str(?item), 33)) as ?num).
?item wikibase:sitelinks ?sitelinks
service wikibase:label {bd:serviceParam wikibase:language "de,en".}
}
order by desc(?sitelinks) asc(?num)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?item"):::projected
v4("?item_class")
v5("?num")
v1("?sitelinks"):::projected
a1((" "))
c3([https://de.wikipedia.org/]):::iri
c6(["wd:Q6581072"]):::iri
c13(["bd:serviceParam"]):::iri
c10(["wd:Q852857"]):::iri
c9(["wd:Q488111"]):::iri
c8(["wd:Q5"]):::iri
c15(["de,en"]):::literal
f0[["not "]]
subgraph f0e0["Exists Clause"]
e0a1 --"schema:about"--> e0v1
e0a1 --"schema:isPartOf"--> e0c3
e0v1("?item"):::projected
e0a1((" ")):::projected
e0c3([https://de.wikipedia.org/]):::iri
end
f0--EXISTS--> f0e0
f0 --> a1
f0 --> c1
f0 --> v3
f0 --> c2
f0 --> c3
a1 --"schema:about"--> v3
a1 --"schema:isPartOf"--> c3
bind1[/VALUES ?item_class/]
bind1-->v4
bind10(["wd:Q6665249"])
bind10 --> bind1
bind11(["wd:Q19595175"])
bind11 --> bind1
v3 --"wdt:P106"--> v4
v3 --"wdt:P21"--> c6
v3 --"wdt:P31"--> c8
subgraph minus2["MINUS"]
style minus2 stroke-width:6px,fill:pink,stroke:red;
v3 --"wdt:P106"--> c9
end
subgraph minus3["MINUS"]
style minus3 stroke-width:6px,fill:pink,stroke:red;
v3 --"wdt:P106"--> c10
end
bind4[/"http://www.w3.org/2001/XMLSchema#integer(substring(str(?item),'33^^xsd:integer'))"/]
v3 --o bind4
bind4 --as--o v5
v3 --"wikibase:sitelinks"--> v1
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c13 --"wikibase:language"--> c15
end