LinkedWiki-Sandbox: Difference between revisions
From artserver wiki
(Created page with "=Wikidata query: European capitals with population larger than 1 million== <source lang="sparql"> {{#sparql: SELECT DISTINCT ?country ?countryName ?capital ?capitalName ?capi...") |
No edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 25: | Line 25: | ||
}} | }} | ||
</source> | </source> | ||
{{#sparql: | |||
SELECT DISTINCT ?country ?countryName ?capital ?capitalName ?capitalPop | |||
WHERE | |||
{ | |||
?country wdt:P31 wd:Q6256 . | |||
?country rdfs:label ?countryName . | |||
FILTER (LANG(?countryName) = "en"). | |||
?country wdt:P30 wd:Q46 . | |||
?country wdt:P36 ?capital . | |||
?capital rdfs:label ?capitalName . | |||
FILTER (LANG(?capitalName) = "en") | |||
?capital wdt:P1082 ?pop . | |||
FILTER ( abs(?pop) > 1000000) | |||
BIND(round(?pop) as ?capitalPop ) | |||
} | |||
ORDER BY DESC(?capitalPop) | |||
LIMIT 20 | |||
|config=http://www.wikidata.org | |||
|chart=bordercloud.visualization.DataTable | |||
|options=width=100%!height=500px | |||
|log=2 | |||
}} |
Latest revision as of 14:40, 15 May 2020
Wikidata query: European capitals with population larger than 1 million=
{{#sparql:
SELECT DISTINCT ?country ?countryName ?capital ?capitalName ?capitalPop
WHERE
{
?country wdt:P31 wd:Q6256 .
?country rdfs:label ?countryName .
FILTER (LANG(?countryName) = "en").
?country wdt:P30 wd:Q46 .
?country wdt:P36 ?capital .
?capital rdfs:label ?capitalName .
FILTER (LANG(?capitalName) = "en")
?capital wdt:P1082 ?pop .
FILTER ( abs(?pop) > 1000000)
BIND(round(?pop) as ?capitalPop )
}
ORDER BY DESC(?capitalPop)
LIMIT 20
|config=http://www.wikidata.org
|chart=bordercloud.visualization.DataTable
|options=width=100%!height=500px
|log=2
}}
{{#sparql: SELECT DISTINCT ?country ?countryName ?capital ?capitalName ?capitalPop WHERE
{ ?country wdt:P31 wd:Q6256 . ?country rdfs:label ?countryName . FILTER (LANG(?countryName) = "en"). ?country wdt:P30 wd:Q46 . ?country wdt:P36 ?capital . ?capital rdfs:label ?capitalName . FILTER (LANG(?capitalName) = "en") ?capital wdt:P1082 ?pop . FILTER ( abs(?pop) > 1000000) BIND(round(?pop) as ?capitalPop ) }
ORDER BY DESC(?capitalPop) LIMIT 20
|config=http://www.wikidata.org |chart=bordercloud.visualization.DataTable |options=width=100%!height=500px |log=2 }}