query-6373994e81ddbf79e211e87b5c3c609e
有地铁的城市
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 bd: <http://www.bigdata.com/rdf#>
SELECT
DISTINCT
?cityLabel
#?stationLabel ?lineLabel ?line
#
WHERE {
{
SELECT *
WHERE {
{
SELECT *
WHERE {
?station wdt:P31/wdt:P279* wd:Q928830.
#?station wdt:P625 ?location.
#?station wdt:P81 ?line.
}
}
?station wdt:P131/wdt:P279* ?city.
?city wdt:P31/wdt:P279* wd:Q515.
}
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "zh,[AUTO_LANGUAGE],zh". }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?city")
v1("?station")
a1((" "))
a2((" "))
a3((" "))
c3(["wd:Q928830"]):::iri
c9(["zh,#91;AUTO_LANGUAGE#93;,zh"]):::literal
c7(["bd:serviceParam"]):::iri
c5(["wd:Q515"]):::iri
v1 --"wdt:P31"--> a1
a1 --"wdt:P279"--> c3
v1 --"wdt:P131"--> a2
a2 --"wdt:P279"--> v2
v2 --"wdt:P31"--> a3
a3 --"wdt:P279"--> c5
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c7 --"wikibase:language"--> c9
end