Hey: Nope.. that won't work.. that puts everything in a single query.. The reason I'm doing SELECT ... FROM ( SELECT.. GROUP BY ..) is to get rid of multiple items in the same day. That's why I group by date, items and then group by date.
If I could do a count(distinct(items)) I could do that in a single query :(.. Hope I made my point.. thanks again! On Fri, Jan 28, 2011 at 7:59 PM, Vasile Ermicioi <elff...@gmail.com> wrote: > perhaps > db((db.logs.date.year()==2010) & (db.stock.item == > db.logs.item)).select(db.logs.date,db.logs.item.count(), > groupby=db.logs.date)