[storm] Subselect query

Aurélien Bompard aurelien at bompard.org
Fri Jun 21 08:13:36 UTC 2013


> Sure. Adjust the first argument to the store.find() call to
> (Email.sender_name, Email.sender_email, Count(Email.sender_email)).
> The tuples you retrieve from the result set will hold the column
> values rather than the whole Email object. James.

Ah, right.
By the way I had to add Email.sender_name to the group_by clause since
apparently PostgreSQL wants all non-ordered-by columns to be aggregated
(or at least that's how I understood it), but that's a different topic.
Thanks James !

Aurélien
-- 
http://aurelien.bompard.org    ~~~~~~    xmpp:aurelien at bompard.org
"Nous n'héritons pas la Terre de nos ancêtres, nous l'empruntons
à nos enfants." -- Antoine de Saint-Exupéry




More information about the storm mailing list