select last row for each group

Notice: This thread is very old.
Matúš Matula
Member | 257
+
0
-

How to make Database Selection for this sql?


SELECT  a.*
FROM    message a
        INNER JOIN
        (
            SELECT  c_id, MAX(time) time
            FROM    message
            GROUP   BY c_id
        ) b ON a.c_id = b.c_id AND
                a.time = b.time

CZechBoY
Member | 3608
+
+1
-

It is not possible…

Matúš Matula
Member | 257
+
0
-

thanks. I was considering replacing dibi with ndb..not gonna happen