Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1. List motto texts (wdt:P1451) of ALL states of the United States.
- SELECT ?state ?stateLabel ?motto WHERE {
- ?state wdt:P31 wd:Q35657;
- wdt:P1451 ?motto.
- SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
- }
- 2. List Q-numbers and (english) names of ALL Noble Prize winners that were born IN Wrocław.
- SELECT ?winner ?winnerLabel WHERE {
- ?winner wdt:P19 wd:Q1799;
- wdt:P166 [wdt:P31 wd:Q7191].
- SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
- }
- 3. List ALL persons that were born IN Poland and died at a place at the elevation above 8000 metres above sea level (be careful WITH units!).
- SELECT ?ppl ?pplLabel ?hM
- WHERE
- {
- ?ppl wdt:P19 [wdt:P17 wd:Q36].
- ?ppl wdt:P20 ?place.
- ?place p:P2044 ?stmnode. # height above sea lvl
- ?stmnode psv:P2044 ?valuenode.
- ?valuenode wikibase:quantityAmount ?height.
- ?valuenode wikibase:quantityUnit ?unit.
- # conversion to SI unit
- ?unit p:P2370 ?unitstmnode. # conversion to SI unit
- ?unitstmnode psv:P2370 ?unitvaluenode.
- ?unitvaluenode wikibase:quantityAmount ?conversion.
- ?unitvaluenode wikibase:quantityUnit wd:Q11573. # meter
- BIND(?height * ?conversion AS ?hM).
- FILTER(?hM>8000)
- SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
- }
- LIMIT 10
- 4. List 10 polish cities WITH the biggest number of scientists (according TO their place of birth). Show the names of the cities and the number of scientists. Sort the cities IN descending ORDER.
- SELECT ?city ?cityLabel (COUNT(DISTINCT ?person) AS ?COUNT)
- WHERE {
- ?person wdt:P19 ?city.
- ?city wdt:P31 wd:Q515; wdt:P17 wd:Q36.
- ?person wdt:P106 [wdt:P279 wd:Q901].
- SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
- }
- GROUP BY ?city ?cityLabel
- ORDER BY DESC(?COUNT)
- LIMIT 10
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement