query-d9e348f0d9395b7abc89bab9fbeba1c2
List badges on non-list itemsMany of these cases could be okay or "okay". The issue here is that quite a lot of list articles are merged with a non-list item.
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 schema: <http://schema.org/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?badge ?badgeLabel ?sitelink ?item WHERE {
VALUES ?badge { wd:Q51759403 wd:Q17506997 }
?sitelink wikibase:badge ?badge; schema:about ?item .
MINUS { ?item wdt:P31/wdt:P279* wd:Q13406463 }
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("?badge"):::projected
v3("?item"):::projected
v2("?sitelink"):::projected
a1((" "))
c7(["bd:serviceParam"]):::iri
c9(["en"]):::literal
c5(["wd:Q13406463"]):::iri
bind0[/VALUES ?badge/]
bind0-->v1
bind00(["wd:Q51759403"])
bind00 --> bind0
bind01(["wd:Q17506997"])
bind01 --> bind0
v2 --"wikibase:badge"--> v1
v2 --"schema:about"--> v3
subgraph minus1["MINUS"]
style minus1 stroke-width:6px,fill:pink,stroke:red;
v3 --"wdt:P31"--> a1
a1 --"wdt:P279"--> c5
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c7 --"wikibase:language"--> c9
end