[sqlalchemy] Re: Aggregation funnctions as mapped column_properties

2009-10-01 Thread Bj
not sure if the example was clear enough. What I'm trying to do is to convert the following select to a mapped- class: select id, usr_id, rating, ( select COUNT(*) from ratings as r where r.id = ratings.id ), ( select AVG(r.rating) from ratings as r where r.id = ratings.id)

[sqlalchemy] Re: Aggregation funnctions as mapped column_properties

2009-10-01 Thread Michael Bayer
Bj wrote: not sure if the example was clear enough. What I'm trying to do is to convert the following select to a mapped- class: select id, usr_id, rating, ( select COUNT(*) from ratings as r where r.id = ratings.id ), ( select AVG(r.rating) from ratings as r where r.id =