query-698c5704d01f6e2021d2d61b11a468ad
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 ?thing (REPLACE(STR(?thing),".*Q","Q") AS ?thingQid) ?thingLabel
WHERE
{
?thing wdt:P366 wd:Q660668 .
FILTER NOT EXISTS { ?thing wdt:P31/wdt:P279* wd:Q1229765 . }
FILTER NOT EXISTS { ?thing wdt:P31/wdt:P279* wd:Q18758641 . }
SERVICE wikibase:label {bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,fr,es,it,de,pl".}
}
LIMIT 500
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?thing"):::projected
v2("?thingQid")
a2((" "))
a1((" "))
c8(["bd:serviceParam"]):::iri
c6(["wd:Q660668"]):::iri
c4(["wd:Q1229765"]):::iri
c10(["#91;AUTO_LANGUAGE#93;,en,fr,es,it,de,pl"]):::literal
c3(["wd:Q18758641"]):::iri
f0[["not "]]
subgraph f0e0["Exists Clause"]
e0v1 --"wdt:P31"--> e0a1
e0a1 --"wdt:P279"--> e0c3
e0v1("?thing"):::projected
e0a1((" ")):::projected
e0c3(["wd:Q18758641"]):::iri
end
f0--EXISTS--> f0e0
f0 --> v1
f0 --> c1
f0 --> a1
f0 --> c2
f0 --> c3
v1 --"wdt:P31"--> a1
a1 --"wdt:P279"--> c3
f1[["not "]]
subgraph f1e1["Exists Clause"]
e1v1 --"wdt:P31"--> e1a1
e1a1 --"wdt:P279"--> e1c3
e1v1("?thing"):::projected
e1a1((" ")):::projected
e1c3(["wd:Q1229765"]):::iri
end
f1--EXISTS--> f1e1
f1 --> v1
f1 --> c1
f1 --> a2
f1 --> c2
f1 --> c4
v1 --"wdt:P31"--> a2
a2 --"wdt:P279"--> c4
v1 --"wdt:P366"--> c6
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c8 --"wikibase:language"--> c10
end
bind2[/"replace(str(?thing),'.*Q','Q')"/]
v1 --o bind2
bind2 --as--o v2