Invalid SQL for thresholded facet counting
Aklakan opened this issue · 0 comments
Aklakan commented
This query fails seemingly with a syntax error near an SQL UNION.
Probably some parenthesis are set incorrectly in the serialization phase, but might as well be a more complex problem.
Select ?p_1 ?_c_ {{{ Select ?p_1 (Count(*) As ?_c_) {{ Select ?p_1 ?o_1 {{ Select ?p_1 ?o_1 {?s ?p_1 ?o_1 . Filter((?p_1 In (<http://dcat.cc/ontology/hasEndpoints>)))} Limit 1000 }} }} Group By ?p_1 }} Union {{ Select ?p_1 (Count(*) As ?_c_) {{ Select ?p_1 ?o_1 {{ Select ?p_1 ?o_1 {?s ?p_1 ?o_1 . Filter((?p_1 In (<http://dcat.cc/ontology/url>)))} Limit 1000 }} }} Group By ?p_1 }} Union {{ Select ?p_1 (Count(*) As ?_c_) {{ Select ?p_1 ?o_1 {{ Select ?p_1 ?o_1 {?s ?p_1 ?o_1 . Filter((?p_1 In (<http://www.w3.org/2000/01/rdf-schema#label>)))} Limit 1000 }} }} Group By ?p_1 }} Union {{ Select ?p_1 (Count(*) As ?_c_) {{ Select ?p_1 ?o_1 {{ Select ?p_1 ?o_1 {?s ?p_1 ?o_1 . Filter((?p_1 In (<http://dcat.cc/ontology/owner>)))} Limit 1000 }} }} Group By ?p_1 }} Union {{ Select ?p_1 (Count(*) As ?_c_) {{ Select ?p_1 ?o_1 {{ Select ?p_1 ?o_1 {?s ?p_1 ?o_1 . Filter((?p_1 In (<http://dcat.cc/ontology/hasDownloads>)))} Limit 1000 }} }} Group By ?p_1 }} Union {{ Select ?p_1 (Count(*) As ?_c_) {{ Select ?p_1 ?o_1 {{ Select ?p_1 ?o_1 {?s ?p_1 ?o_1 . Filter((?p_1 In (<http://dcat.cc/ontology/version>)))} Limit 1000 }} }} Group By ?p_1 }} Union {{ Select ?p_1 (Count(*) As ?_c_) {{ Select ?p_1 ?o_1 {{ Select ?p_1 ?o_1 {?s ?p_1 ?o_1 . Filter((?p_1 In (<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>)))} Limit 1000 }} }} Group By ?p_1 }} Union {{ Select ?p_1 (Count(*) As ?_c_) {{ Select ?p_1 ?o_1 {{ Select ?p_1 ?o_1 {?s ?p_1 ?o_1 . Filter((?p_1 In (<http://dcat.cc/ontology/hasDefaultGraphs>)))} Limit 1000 }} }} Group By ?p_1 }} Union {{ Select ?p_1 (Count(*) As ?_c_) {{ Select ?p_1 ?o_1 {{ Select ?p_1 ?o_1 {?s ?p_1 ?o_1 . Filter((?p_1 In (<http://dcat.cc/ontology/groupId>)))} Limit 1000 }} }} Group By ?p_1 }} Union {{ Select ?p_1 (Count(*) As ?_c_) {{ Select ?p_1 ?o_1 {{ Select ?p_1 ?o_1 {?s ?p_1 ?o_1 . Filter((?p_1 In (<http://dcat.cc/ontology/artifactId>)))} Limit 1000 }} }} Group By ?p_1 }}} Limit 1000