Hi,
We want to find all but the most recent processes for each app based on the
:created_at field. Here's the raw SQL that works:
mysql> select distinct p1.id
from processes p1 join processes p2
where p1.app_guid = p2.app_guid and
p1.created_at < p2.created_at;
+----+
| id |
+----+
| 1 |
| 2 |
+----+
2 rows in set (0.01 sec)
What's a good way to express this in Sequel?
Thanks,
Eric
--
You received this message because you are subscribed to the Google Groups
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.