Actions

Difference between revisions of "LinkedWiki-Sandbox"

From /oooooooooo.io/

 
Line 26: Line 26:
 
</source>
 
</source>
  
 +
{{#sparql:
 
SELECT DISTINCT ?country ?countryName ?capital ?capitalName ?capitalPop  
 
SELECT DISTINCT ?country ?countryName ?capital ?capitalName ?capitalPop  
 
WHERE
 
WHERE

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 }}