I have one table, (table1).
Fields (date, asset_id, and location)..*and some other ones*
I want to get the most resent date and the location on that date, for each asset_id.
I was trying to use a MAX() on the date, in combination with a distinct on the asset_id. It didnt work.
How do I do this?
So for each distinct asset_id, i want to get its latest date.
Thanks.
Chad
Fields (date, asset_id, and location)..*and some other ones*
I want to get the most resent date and the location on that date, for each asset_id.
I was trying to use a MAX() on the date, in combination with a distinct on the asset_id. It didnt work.
How do I do this?
So for each distinct asset_id, i want to get its latest date.
Thanks.
Chad