Last active
May 30, 2016 14:53
-
-
Save Drake81/041809a3d8217cb9dc09f3e6e5ab9684 to your computer and use it in GitHub Desktop.
Sparql query on astronauts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# select all astronauts with name, image, birthdate, birthplace and coordinates of the birthplace | |
# https://query.wikidata.org/#%23%20select%20all%20astronauts%20with%20name%2C%20image%2C%20birthdate%2C%20birthplace%20and%20coordinates%20of%20the%20birthplace%0A%0ASELECT%20%3Fastronaut%20%3FastronautLabel%20%3Fimage%20%3Fbirthdate%20%3Fbirthplace%20%3Fcoord%20WHERE%20%7B%0A%20%20%3Fastronaut%20%3Fx1%20wd%3AQ11631%3B%0A%20%20wdt%3AP18%20%3Fimage%3B%0A%20%20wdt%3AP569%20%3Fbirthdate%3B%0A%20%20wdt%3AP19%20%3Fbirthplace%3B%0A%20%20wdt%3AP31%20wd%3AQ5.%0A%20%20%0A%20%20%3Fbirthplace%20wdt%3AP625%20%3Fcoord%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22en%22.%20%7D%0A%7D%0AORDER%20BY%20DESC(%3Fbirthdate) | |
SELECT ?astronaut ?astronautLabel ?image ?birthdate ?birthplace ?coord WHERE { | |
?astronaut ?x1 wd:Q11631; | |
wdt:P18 ?image; | |
wdt:P569 ?birthdate; | |
wdt:P19 ?birthplace; | |
wdt:P31 wd:Q5. | |
?birthplace wdt:P625 ?coord | |
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". } | |
} | |
ORDER BY DESC(?birthdate) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment