Selecting Latest Rows In Subgroups
I have the following table created by a join and some conditionals: product_id date 11111 2012-06-05 11111 2012-05-01 22222 2011-05-01 22222
Solution 1:
Looks like a group by
would fit the bill:
select product_id
, max(date)
from YourTable
group by
product_id
Post a Comment for "Selecting Latest Rows In Subgroups"