Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL max and date trouble

Status
Not open for further replies.

tridith

Programmer
Jul 22, 2005
39
CA
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top