Generally speaking to be valid SPARQL syntax any expressions either in the 
project clause or in GROUP BY/ORDER BY/FILTER etc should be properly bracketed 
and aliased (for project expressions) e.g.

SELECT (<bif:year>(?date) AS ?year) (<bif:month>(?date) AS ?month) 
(count(distinct ?document) AS ?documents)
{
       ?document a :Document;
                :documentDateOfCreation ?date;
                :documentType ?docType.
       FILTER ( ?docType = "exam results"^^xsd:string )
}
group by (<bif:year>(?date)) (<bif:month>(?date))

Try the above and see if that works


Rob Vesse -- YarcData.com<http://YarcData.com> -- A Division of Cray Inc
Software Engineer, Bay Area
m: 925.960.3941  |  o: 925.264.4729 | @: 
[email protected]<mailto:[email protected]>  |  Skype: rvesse
6210 Stoneridge Mall Rd  |  Suite 120  | Pleasanton CA, 94588

[cid:[email protected]]

On Mar 22, 2012, at 11:43 AM, Diogo FC Patrao wrote:

SELECT <bif:year>(?date) <bif:month>(?date) count(distinct ?document)
{
       ?document a :Document;
                :documentDateOfCreation ?date;
                :documentType ?docType.
       FILTER ( ?docType = "exam results"^^xsd:string )
}
group by <bif:year>(?date) <bif:month>(?date)

Reply via email to