> On 26 Feb 2019, at 10:51, Richard Dijkstra <[email protected]> 
> wrote:
> 
> I query:
> 
>         SELECT  ?naam  (COUNT(?naam) as ?count)
>         WHERE { 
>                 ?sfg_cust local:Klantnr ?klantnr ;
>                           rdfs:label ?naam .
>                 FILTER (?count = 2)
>                 }
>                 GROUP BY ?naam
>                 ORDER BY DESC(?count)
>                 """, 
> 
> on the following graph:
> 
> local:sfg_customer_100068 a local:Sfg_customer ;
>     rdfs:label "SCALDA COLL V BROOD EN BANKET" ;
>     ...
>     local:Klant_categorienr 345 ;
>     local:Klant_omschrijving "SCALDA COLL V BROOD EN BANKET"^^xsd:string ;
>     local:Klantnr "100068"^^xsd:string ;
> 
> Without the FILTER I get a nice result; but with FILTER the result is empty.
> What is wrong?

Quick answer without trying it out: the aggregate projection variable is only 
defined outside of the WHERE block, so it's not available within...
Try HAVING (https://www.w3.org/TR/2013/REC-sparql11-query-20130321/#having) or 
an inner query.

j

-- 
http://github.com/RDFLib
--- 
You received this message because you are subscribed to the Google Groups 
"rdflib-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rdflib-dev/D3491C60-088C-4D3B-A684-2145FFC398EF%40joernhees.de.
For more options, visit https://groups.google.com/d/optout.

Reply via email to