query-9075f5f6101a8f64c0ab77dcc98616ec

rq turtle/ttl

Need for a simple count that is time-consuming https://github.com/OSMBrasil/semantic-bridgeGenerating "time out" error. I need this counting query to } . Q155:wd P17:wdt/)P279:wdt|P31:wdt( ?item .:b0 P402:wdt ?item { WHERE )?count AS )?item DISTINCT(COUNT( SELECT 21:14, 2 August 2018 (UTC)) talk (Krauss--. I try with "similar but not the same" operations, ≥ 5580PS: expected # wdt:P279/wdt:P31/wdt:P17 = 100981 # wdt:P31/wdt:P279/wdt:P17 = 101035 #seems optimal # wdt:P31/wdt:P17 = 100856 # wdt:P17 = 99224 } Q155:wd P17:wdt/P31:wdt/P279:wdt ?item { WHERE )?count AS )?item DISTINCT(COUNT( SELECT # ... seems all = 5580 # wdt:P279/wdt:P31/wdt:P17 = 5580 # wdt:P31/wdt:P279/wdt:P17 = 5580 # wdt:P31/wdt:P17 = 5580 #seems optimal # wdt:P17 = 5579 } Q155:wd P17:wdt*/P31:wdt ?item . :b0 P402:wdt ?item { WHERE )?count AS )?item DISTINCT(COUNT( SELECTI'm not sure what you are trying to count. In general, P17=Q155 should be present on all relevant items. So doing the below should be sufficient (currently 5581):

Use at

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT  (COUNT(DISTINCT ?item) AS ?count) 
WHERE
{
      ?item wdt:P402 _:b0.
      ?item wdt:P17 wd:Q155 .
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?count") v1("?item"):::projected a1((" ")) c3(["wd:Q155"]):::iri v1 --"wdt:P402"--> a1 v1 --"wdt:P17"--> c3 bind1[/"count(?item)"/] v1 --o bind1 bind1 --as--o v2