Is there an effective way to place an order and a group so that you get a specific item from each group (from order).
//This is the best way i have come up with. SELECT D.* FROM ( SELECT * FROM devices ORDER BY time ) AS D GROUP BY D.location
source share