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

another aggregates test case...

From: Axel Polleres <axel.polleres@deri.org>
Date: Tue, 8 Jun 2010 14:07:38 +0100
Message-Id: <61776A68-5FD8-478C-A0EA-176BC4D4FFDA@deri.org>
To: SPARQL Working Group <public-rdf-dawg@w3.org>
Student of mine pointed me to a somewhat corner test case:

PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> 
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> 
PREFIX dcterms: <http://purl.org/dc/terms/> 
PREFIX foaf: <http://xmlns.com/foaf/0.1/> 
PREFIX mpp: <http://imp.deri.ie/ontology/moviePostProcessing#> 

SELECT * 
FROM NAMED <http://imp.deri.ie/vff/ppa/projects> 
FROM NAMED <http://imp.deri.ie/vff/ppa/people> 
WHERE {

 ?project rdf:type foaf:Project ;
          rdfs:label ?title .
 ?person rdf:type mpp:Person ;
          rdfs:label ?personName ;
          foaf:currentProject ?project .
}
GROUP BY ?project

Actually, I *think* this should be syntactically invalid, as per:
"In aggregate queries and sub-queries only expressions which have been used as GROUP BY expressions, or aggregated expressions (i.e. expressions where all variables appear inside an aggregate) can be projected."

interestingly, the formulation - strictly speaking - doesn't say what an aggregate query is, but GROUP BY without aggregtate doesn't make a lot of sense anyways, except that it should have the same effect as DISTINCT, right(?), but we still don't want to allow in the presence of GROUP BY some non-grouped/aggregated things to be projected, I assume.

Axel 
Received on Tuesday, 8 June 2010 13:08:22 GMT

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