0
0to60
Consider the following table:
ID dateField intFieldA intFieldB stringFieldA
stringFieldB
I want a query that will give me the row with MAX(dateField) grouped by ID.
If I say:
SELECT Max(dateField), ID
FROM table
GROUP BY ID;
Then that will give me each ID in the table and its maximum dateField. I
want the entire ROW that contains this maximum dateField, and I want it for
each ID. How do I write this query?
ID dateField intFieldA intFieldB stringFieldA
stringFieldB
I want a query that will give me the row with MAX(dateField) grouped by ID.
If I say:
SELECT Max(dateField), ID
FROM table
GROUP BY ID;
Then that will give me each ID in the table and its maximum dateField. I
want the entire ROW that contains this maximum dateField, and I want it for
each ID. How do I write this query?