W3C home > Mailing lists > Public > public-rdf-dawg@w3.org > October to December 2010

Aggregates question...

From: Axel Polleres <axel.polleres@deri.org>
Date: Wed, 6 Oct 2010 21:31:13 -0400
Message-Id: <3F9534C8-8A06-4A76-9FD1-006B197C02FD@deri.org>
To: SPARQL Working Group <public-rdf-dawg@w3.org>
What happens when grouping for UNBOUND variables?

E.g. 

Graph:
:s1 :p :o1.
:s1 :p :o2.
:s1 :q :o3.
:s2 :p :o1.
:s2 :p :o2.

Query:

  SELECT ?Q (COUNT(?P) as ?CP)
  WHERE { ?S :p ?P  OPTIONAL {?S :q ?Q } }
  GROUP BY ?Q

My current understanding is:

  that this returns 

   ?Q | ?CP
  =========
  :o3 | 2

rather than

   ?Q | ?CP
  =========
  :o3 | 2
      | 2

yes?


In general, what is unclear to me is what ListEval returns when for ExprList = ?var and &mu;(?var) undefined?
It seems, strictly following the definition &mu;(?var) would then just amount to ?var , then again, I don't know what that 
should mean for the rest of the aggregation semantics? 

best, 
Axel
Received on Thursday, 7 October 2010 01:31:57 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 16:15:44 GMT