User:Hweyl/sparql
SPARQL queries
editNational Humanities Medal
editReturn an image grid of all winners of the National Humanities Medal
editThe following query uses these:
- Properties: award received (P166) , image (P18)
SELECT ?person ?personLabel ?image WHERE { ?person wdt:P166 wd:Q1571938. ?person wdt:P18 ?image . SERVICE wikibase:label { bd:serviceParam wikibase:language "en". } }
BHL Consortium
editThe following query uses these:
- Properties: member of (P463) , image (P18)
SELECT ?item ?label ?_image WHERE { ?item wdt:P463 wd:Q43777620. SERVICE wikibase:label { bd:serviceParam wikibase:language "en" . ?item rdfs:label ?label } OPTIONAL { ?item wdt:P18 ?_image. } }
People who signed 'The Giving Pledge' and what they founded
editThe following query uses these:
- Items: The Giving Pledge (Q203807)
- Properties: signatory (P1891) , founded by (P112)
SELECT ?person ?personLabel ?orgLabel WHERE { wd:Q203807 wdt:P1891 ?person. ?org wdt:P112 ?person. SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } }
Map of observatories
editThe following query uses these:
- Items: observatory (Q62832)
- Properties: instance of (P31) , coordinate location (P625) , image (P18)
Features: map (Q24515275)
#defaultView:Map
SELECT ?building ?buildingLabel ?coord ?image WHERE {
?building wdt:P31 wd:Q62832.
?building wdt:P625 ?coord.
OPTIONAL { ?building wdt:P18 ?image. }
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}
Protected areas in Washington
editThe following query uses these:
- Properties: instance of (P31) , located in the administrative territorial entity (P131)
SELECT ?item ?itemLabel WHERE { ?item wdt:P31 wd:Q473972. ?item wdt:P131 wd:Q1223. SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } }