Hi,

How can I express the following query with Storm:

  SELECT DISTINCT ON (assignee) task.* FROM task
   ORDER BY assignee, date_created

(Get the oldest task for each assignee.)

I can do something like:

  columns = SQL("DISTINCT ON (assignee) assignee"), Task
  ordering = Task.assignee, Task.date_created
  results = store.find(columns).order_by(ordering)

However, list(results) comes out with something like:

  [(1, <Task object at ...>),
   (2, <Task object at ...>)]

I'd like to be able to not select the assignee column separately, and
I'd like to avoid using SQL() if possible.

Thanks, Gavin.

-- 
storm mailing list
[email protected]
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/storm

Reply via email to