Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
PREFIX wd: <>
PREFIX wdt: <>
PREFIX wikibase: <>
PREFIX p: <>
PREFIX ps: <>
PREFIX pq: <>
PREFIX rdfs: <>
PREFIX bd: <>
#List of present-day countries and capital(s)
SELECT ?countryLabel ?country2Label
?country wdt:P47 ?country2.
?country2 wdt:P31 wd:Q6256.
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
ORDER BY ?countryLabel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment