query-c31898d030ee35e8b2d19cfe793a7c42
TODO
Use at
- https://query.wikidata.org/sparql
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX psn: <http://www.wikidata.org/prop/statement/value-normalized/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?item ?itemLabel ?countryLabel ?capacity_in_Mw ?stateLabel ?coords
WHERE
{
?item (wdt:P31/(wdt:P279*)) wd:Q159719;
p:P2109 ?stmnode;
wdt:P625 ?coords .
?stmnode psn:P2109 ?valuenode. # normalised value
?valuenode wikibase:quantityAmount ?capacity_in_W.
BIND(?capacity_in_W / "1e6"^^xsd:double AS ?capacity_in_Mw)
OPTIONAL{?item wdt:P17 ?country .}
OPTIONAL{?item wdt:P5817 ?state .}
SERVICE wikibase:label {
bd:serviceParam wikibase:language "en" .
}
}
ORDER BY DESC(?capacity_in_Mw)
LIMIT 100
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v7("?capacity_in_Mw"):::projected
v6("?capacity_in_W")
v4("?coords"):::projected
v7("?country")
v2("?item"):::projected
v8("?state")
v3("?stmnode")
v5("?valuenode")
a1((" "))
c3(["wd:Q159719"]):::iri
c13(["en"]):::literal
c11(["bd:serviceParam"]):::iri
v2 --"p:direct/P31"--> a1
a1 --"p:direct/P279"--> c3
v2 --"p:P2109"--> v3
v2 --"p:direct/P625"--> v4
v3 --"p:statement/value-normalized/P2109"--> v5
v5 --"wikibase:quantityAmount"--> v6
bind0[/"?capacity_in_W / '1e6^^xsd:double'"/]
v6 --o bind0
bind0 --as--o v7
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."p:direct/P17".-> v7
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v2 -."p:direct/P5817".-> v8
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c11 --"wikibase:language"--> c13
end