Actions

Difference between revisions of "LinkedWiki-Sandbox"

From /oooooooooo.io/

(Created page with "=Wikidata query: European capitals with population larger than 1 million== <source lang="sparql"> {{#sparql: SELECT DISTINCT ?country ?countryName ?capital ?capitalName ?capi...")
 
Line 25: Line 25:
 
}}
 
}}
 
</source>
 
</source>
 +
 +
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
 +
}}

Revision as of 14:39, 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
}}

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