query-f1388c648392a86c6af36745fed37da9

rq turtle/ttl

Remove duplicates when the subject has several objects that corresponds to one predicateHello I'm trying to obtain a list of all schools that are an "Institut d'études politiques" (a french school type) I wrote the following query :

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel 
WHERE 
{
 ?item wdt:P31/wdt:P279* wd:Q5341295.
 ?item rdfs:label ?itemLabel.
 filter contains(?itemLabel,"Institut d'études politiques"). 

FILTER(LANG(?itemLabel) = "fr").

 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; v2("?item"):::projected v1("?itemLabel"):::projected a1((" ")) c5(["wd:Q5341295"]):::iri c8(["bd:serviceParam"]):::iri c1(["fr"]):::literal f0[["?itemLabel = 'fr'"]] f0 --> v1 f1[["contains(?itemLabel,'Institut d'études politiques')"]] f1 --> v1 v2 --"wdt:P31"--> a1 a1 --"wdt:P279"--> c5 v2 --"rdfs:label"--> v1 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c8 --"wikibase:language"--> c1 end