what does {{=stats}} show ? On Friday, May 2, 2014 9:46:26 PM UTC+2, pete...@gmail.com wrote: > > Hey guys, > > I want to display some aggregated stats (items per year) with a sqltable, > but the aggregate count column never shows up in the sqltable. > Basically only the groupby column is shown. > > This is my controller > count = db.stats.id.count() > stats = db(db.stats.id).select(db.stats.created_year, count, > groupby=db.stats.created_year) > return dict(stats=stats) > > the view > {{=SQLTABLE(stats)}} > > From the postgresql side everything seems fine, web2py's sql statement > 'SELECT stats.created_year, COUNT(stats.id) FROM stats WHERE (stats.idIS NOT > NULL) GROUP BY stats.created_year;' returns records as expected when > run on the database server directly. > > Am I missing something obvious? > > Cheers > Pete > > > >
-- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.