query-6308d4e94eaa8c677749608514090c87

rq turtle/ttl

Look after a/some specific FAA (USA) code(s)

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?FAA_LID  ?item ?itemLabel (group_concat(?natureLabel) as ?natures) {
SELECT distinct ?FAA_LID ?item ?itemLabel ?nature ?natureLabel WHERE {
{?item wdt:P240 ?FAA_LID
VALUES ?FAA_LID {"AR44" "CO20" }.} #item has a P240 value   
OPTIONAL { ?item wdt:P31 ?nature. }
SERVICE wikibase:label { bd:serviceParam wikibase:language "fr,en" } . #this bit gets labels for Qid values
}
} group by ?FAA_LID ?item ?itemLabel

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?FAA_LID"):::projected v1("?item"):::projected v3("?nature") v4("?natureLabel"):::projected v5("?natures") c4(["bd:serviceParam"]):::iri c6(["fr,en"]):::literal v1 --"wdt:P240"--> v3 bind0[/VALUES ?FAA_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