query-ef26c968254112940bc17aa9eecbb41d
Triplets with their encodement SELECT ?itemLabel ?codingLabel WHERE { ?item wdt:P31 wd:Q165052. Optional{?item wdt:P688 ?codingLabel.} FILTER NOT EXISTS{?item wdt:P31 wd:Q28354.} FILTER NOT EXISTS{?item wdt:P31 wd:Q1854186.} SERVICE wikibase:label { bd:serviceParam wikibase:language "en,nl". } }
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#>
#Triplets with their encodement
SELECT ?itemLabel ?codingLabel WHERE {
?item wdt:P31 wd:Q165052.
Optional{?item wdt:P688 ?codingLabel.}
FILTER NOT EXISTS{?item wdt:P31 wd:Q28354.}
FILTER NOT EXISTS{?item wdt:P31 wd:Q1854186.}
SERVICE wikibase:label { bd:serviceParam wikibase:language "en,nl". }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?codingLabel"):::projected
v1("?item")
c9(["en,nl"]):::literal
c7(["bd:serviceParam"]):::iri
c3(["wd:Q28354"]):::iri
c2(["wd:Q1854186"]):::iri
c4(["wd:Q165052"]):::iri
f0[["not "]]
subgraph f0e0["Exists Clause"]
e0v1 --"wdt:P31"--> e0c2
e0v1("?item"):::projected
e0c2(["wd:Q1854186"]):::iri
end
f0--EXISTS--> f0e0
f0 --> v1
f0 --> c1
f0 --> c2
v1 --"wdt:P31"--> c2
f1[["not "]]
subgraph f1e1["Exists Clause"]
e1v1 --"wdt:P31"--> e1c2
e1v1("?item"):::projected
e1c2(["wd:Q28354"]):::iri
end
f1--EXISTS--> f1e1
f1 --> v1
f1 --> c1
f1 --> c3
v1 --"wdt:P31"--> c3
v1 --"wdt:P31"--> c4
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P688".-> v2
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c7 --"wikibase:language"--> c9
end