I've looked for a while, but I can't find the *best* way to use the ORM to generate the following query:
SELECT user_id, count(*) cnt FROM orders GROUP BY user_id I have classes that represent both User and Order. So what should go after: Order.query.[fill this in] Sorry this is such an easy question, feel free to forward me to an example, I just couldn't find one. -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalch...@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.