query-18bdccc9d87f1b8ce8463f06b5677d76
Inconsistencies in the list of countries by continent}). (P298)ISO 3166-1 alpha-3 code with an ISO code ((Q5107)continent ) in each (P527)has part(s) included ((Q3624078)sovereign state I try to list the See the query
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 ?item ?itemLabel ?country ?countryLabel ?code WHERE { ?item wdt:P31 wd:Q5107; (wdt:P527*) ?country. ?country wdt:P31 wd:Q3624078; wdt:P298 ?code. SERVICE wikibase:label { bd:serviceParam wikibase:language "en". } }
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?code"):::projected
v2("?country"):::projected
v1("?item"):::projected
c4(["wd:Q3624078"]):::iri
c7(["bd:serviceParam"]):::iri
c9(["en"]):::literal
c2(["wd:Q5107"]):::iri
v1 --"wdt:P31"--> c2
v1 --"wdt:P527"--> v2
v2 --"wdt:P31"--> c4
v2 --"wdt:P298"--> v3
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c7 --"wikibase:language"--> c9
end