armtuk: Cheetah (Default)
[personal profile] armtuk
If you can even figure out how this works, Kudos. I'm pretty proud I figured out how to make this. There might be better ways, but this way works, and gets me what I need:

select * from task x, (select p.project_id, u.workflow_id, (select min(due_date) as min_due_date from task t where t.workflow_id=u.workflow_id) as min_due_date from task u, workflow p where u.workflow_id=p.workflow_id group by u.workflow_id, p.project_id) y where x.due_date=y.min_due_date and x.workflow_id=y.workflow_id;

Muhahahaha.

Profile

armtuk: Cheetah (Default)
armtuk

April 2017

S M T W T F S
      1
2345678
9101112131415
16171819 202122
23242526272829
30      

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated May. 19th, 2025 08:00 pm
Powered by Dreamwidth Studios