I am trying to produce a report of how many images were added to our crx repository (under cq 5.3) in the last year, by the directory to which they were added.
In SQL I'd do something like
SELECT COUNT(*) FROM image WHERE image.date >= '2012-01-01' GROUP BY image.directory
However, CQ5's query builder seems to only allow selection of result items, no aggregate information like counts / "group by" - or if it does support that, I can't find documentation on how to use it.
Is this possible, and if so how? If not, is there another way of extracting this information? (I could write a script to submit a separate query for each directory and just return the number of results for each one, but that seems a bit laborious for what is a fairly straightforward requirement.) Apologies if I'm missing something obvious!
There is no count(*) or group by selector in JCR SQL , XPath  or