query-d9e8517c2cac40bd535472c0e2bb7451
Look after a/some specific Ex-USSR internal airport code (P5851) 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 ?Russian_LID ?item ?itemLabel (group_concat(?natureLabel) as ?natures) {
SELECT distinct ?Russian_LID ?item ?itemLabel ?nature ?natureLabel WHERE {
{?item wdt:P6120 ?Russian_LID
VALUES ?Russian_LID {"AR44" "CO20" }.} #item has a P6120 value
OPTIONAL { ?item wdt:P31 ?nature. }
SERVICE wikibase:label { bd:serviceParam wikibase:language "fr,ru" } . #this bit gets labels for Qid values
}
} group by ?Russian_LID ?item ?itemLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?Russian_LID"):::projected
v1("?item"):::projected
v3("?nature")
v4("?natureLabel"):::projected
v5("?natures")
c6(["fr,ru"]):::literal
c4(["bd:serviceParam"]):::iri
v1 --"wdt:P6120"--> v3
bind0[/VALUES ?Russian_LID/]
bind0-->v3
bind00(["AR44"])
bind00 --> bind0
bind01(["CO20"])
bind01 --> 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
bind2[/"?natureLabel"/]
v4 --o bind2
bind2 --as--o v5