query-e5cb7da4fffd51b52d93a22395813a5d
Look after a/some specific Code transport Canada code(s)
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT distinct ?item ?itemLabel ?natureLabel WHERE {
{?item wdt:P5699 ?CodeTC
VALUES ?CodeTC { "HKKG" }.} #item has a P5699 value
OPTIONAL { ?item wdt:P31 ?nature. }
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" } . #this bit gets labels for Qid values
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?CodeTC")
v1("?item"):::projected
v3("?nature")
c4(["bd:serviceParam"]):::iri
c6(["#91;AUTO_LANGUAGE#93;,en"]):::literal
v1 --"wdt:P5699"--> v3
bind0[/VALUES ?CodeTC/]
bind0-->v3
bind00(["HKKG"])
bind00 --> bind0
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P31".-> v3
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c4 --"wikibase:language"--> c6
end