query-a9d66fcefe6444f806758cefd0b4b0ed
Dams ]reply[07:27, 6 December 2022 (UTC) )talk · MSGJ(Thanks for taking on that task. I have a huge spreadsheet that I was planning to import, but looks like you beat me to it! — Martin . Here is a query with the ones that I did not do for various reasons such as 1) No English name, 2) multiple ids per article ie. (PRE), (RE), 3) not found.(P11235)Dams in Japan number : I am done adding ids for MSGJ@
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 ?s ?sLabel WHERE {
?s wdt:P17 wd:Q17 .
?s wdt:P31/wdt:P279* wd:Q12323 .
OPTIONAL {
?s wdt:P11235 ?damid .
}
FILTER ( !bound(?damid) ) .
SERVICE wikibase:label { bd:serviceParam wikibase:language "en,de,fr,es,it,pl,nl,pt,sv,no,ar,cs,ca,ml,ms,az,ru" }
}
ORDER BY ?sLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?damid")
v3("?s"):::projected
v1("?sLabel"):::projected
a1((" "))
c2(["wd:Q17"]):::iri
c8(["bd:serviceParam"]):::iri
c10(["en,de,fr,es,it,pl,nl,pt,sv,no,ar,cs,ca,ml,ms,az,ru"]):::literal
c5(["wd:Q12323"]):::iri
f0[["not bound(?damid)"]]
f0 --> v2
v3 --"wdt:P17"--> c2
v3 --"wdt:P31"--> a1
a1 --"wdt:P279"--> c5
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v3 -."wdt:P11235".-> v2
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c8 --"wikibase:language"--> c10
end