query-40aa2e498ac2c1a10ecd7506776c42f8
Airports named after people
2016-12-20, Jura1
SELECT ?countryLabel ?item ?itemLabel ?itemDescription ?person ?personLabel ?personDescription (sample(?coor) as ?coor) { ?item wdt:P31/wdt:P279* wd:Q1248784 . ?item p:P138/ps:P138 ?person . ?person wdt:P31 wd:Q5 . ?item wdt:P17 ?country . OPTIONAL { ?item wdt:P625 ?coor } . SERVICE wikibase:label { bd:serviceParam wikibase:language "en" . } } GROUP BY ?countryLabel ?item ?itemLabel ?itemDescription ?person ?personLabel ?personDescription ORDER BY ?countryLabel ?itemLabel LIMIT 1000
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 ps: <http://www.wikidata.org/prop/statement/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#Airports named after people
#2016-12-20, Jura1
SELECT ?countryLabel ?item ?itemLabel ?itemDescription ?person ?personLabel ?personDescription (sample(?coor) as ?coor)
{
?item wdt:P31/wdt:P279* wd:Q1248784 .
?item p:P138/ps:P138 ?person .
?person wdt:P31 wd:Q5 .
?item wdt:P17 ?country .
OPTIONAL { ?item wdt:P625 ?coor } .
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" . }
}
GROUP BY ?countryLabel ?item ?itemLabel ?itemDescription ?person ?personLabel ?personDescription
ORDER BY ?countryLabel ?itemLabel
LIMIT 1000
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v7("?coor"):::projected
v5("?country")
v1("?countryLabel"):::projected
v3("?item"):::projected
v2("?itemLabel"):::projected
v4("?person"):::projected
a1((" "))
a2((" "))
c3(["wd:Q1248784"]):::iri
c10(["bd:serviceParam"]):::iri
c6(["wd:Q5"]):::iri
c12(["en"]):::literal
v3 --"p:direct/P31"--> a1
a1 --"p:direct/P279"--> c3
v3 --"p:P138"--> a2
a2 --"p:statement/P138"--> v4
v4 --"p:direct/P31"--> c6
v3 --"p:direct/P17"--> v5
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v3 -."p:direct/P625".-> v7
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c10 --"wikibase:language"--> c12
end
bind1[/"sample(?coor)"/]
v7 --o bind1
bind1 --as--o v7