query-650e80c9005177cd480aa88747cf271e

rq turtle/ttl

display instance of class of ambassadors to/of a country SELECT DISTINCT ?item ?itemLabel ?subclass ?subclassLabel WHERE { {?item wdt:P279 wd:Q29645880.} union {?item wdt:P279 wd:Q29645886} ?item wdt:P279 ?subclass. SERVICE wikibase:label { bd:serviceParam wikibase:language "fr" } }

Use at

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#>
#display instance of class of ambassadors to/of a country 
SELECT DISTINCT ?item ?itemLabel ?subclass ?subclassLabel
WHERE
{
    {?item wdt:P279 wd:Q29645880.} union {?item wdt:P279 wd:Q29645886}
    ?item wdt:P279 ?subclass.
    SERVICE wikibase:label { bd:serviceParam wikibase:language "fr" }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?item"):::projected v2("?subclass"):::projected c5(["bd:serviceParam"]):::iri c3(["wd:Q29645886"]):::iri c2(["wd:Q29645880"]):::iri c7(["fr"]):::literal subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P279"--> c3 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P279"--> c2 end union0r <== or ==> union0l end v1 --"wdt:P279"--> v2 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c5 --"wikibase:language"--> c7 end