query-a65aa2d7a53984354e669de74ddef643

rq turtle/ttl

10:52, 23 June 2017 (UTC)) talk (Ayack for example, there is always a timeout error while there is no more than 300 results... Could you help me to improve this query to prevent the timeout? Thanks. — (Q12620)Mayenne But, when I want to reduce the perimeter to Here is one that works:

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#>
SELECT DISTINCT ?item ?itemLabel ?lieu 
WHERE
{

    ?item wdt:P131+ wd:Q12620 .
    ?item wdt:P31/wdt:P279* wd:Q16970 . 
    ?item wdt:P131 ?lieu .

    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("?lieu"):::projected a1((" ")) c7(["bd:serviceParam"]):::iri c5(["wd:Q16970"]):::iri c9(["fr"]):::literal c2(["wd:Q12620"]):::iri v1 --"wdt:P131"--> c2 v1 --"wdt:P31"--> a1 a1 --"wdt:P279"--> c5 v1 --"wdt:P131"--> v2 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c7 --"wikibase:language"--> c9 end