query-b96fc8727fd7a76665b643ed880cdffc

rq turtle/ttl

name of international airports and number of usersI want to get the name of international airports and number of users in the world. I got the name of the airports easily. However, the number of users has a lot of redundant data.

Use at

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 ?y ?yLabel ?yDescription ?iata ?oh ?pLabel WHERE {
  ?y (wdt:P31/(wdt:P279*)) wd:Q644371.

  OPTIONAL { ?y wdt:P238 ?iata.}
  OPTIONAL { ?y wdt:P856 ?oh. }
  OPTIONAL { ?y wdt:P3872 ?p. }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}

LIMIT 3000

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?iata"):::projected v3("?oh"):::projected v4("?p") v1("?y"):::projected a1((" ")) c8(["bd:serviceParam"]):::iri c10(["en"]):::literal c3(["wd:Q644371"]):::iri v1 --"wdt:P31"--> a1 a1 --"wdt:P279"--> c3 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P238".-> v2 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P856".-> v3 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P3872".-> v4 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c8 --"wikibase:language"--> c10 end