query-44eb7c722907d637550bc3873f9c2efd

rq turtle/ttl

12:55, 14 January 2016 (UTC)) talk (Jobu01012. Is there a possibility to filter the above query such that I get only results where ?films is greater than 1 without putting a third SELECT with FILTER around the query? --1.:fixed, 2:it can be done even shorter:

Use at

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT ?actor (COUNT(DISTINCT(?film)) AS ?films) (GROUP_CONCAT(?film) As ?filmography) WHERE 
{
    VALUES ?film {wd:Q172241 wd:Q47703 wd:Q184768} .
    ?film wdt:P161 ?actor
} 
GROUP BY ?actor 
HAVING (?films > 1)
ORDER BY DESC(?films)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?actor"):::projected v2("?film"):::projected v4("?filmography") v4("?films") f0[["?films > '1^^xsd:integer'"]] f0 --> v4 bind1[/VALUES ?film/] bind1-->v2 bind10(["wd:Q172241"]) bind10 --> bind1 bind11(["wd:Q47703"]) bind11 --> bind1 bind12(["wd:Q184768"]) bind12 --> bind1 v2 --"wdt:P161"--> v3 bind4[/"count(?film)"/] v2 --o bind4 bind4 --as--o v4 bind5[/"?film"/] v2 --o bind5 bind5 --as--o v4