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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

find the max date from many table 1

Status
Not open for further replies.

shelron

Technical User
Apr 9, 2002
135
US
I have a transaction table with an average of 5 rows per unique project.

I would like to find the most recent date for all projects.

The result needs to return one row for each unique project, with that row being the last entry of the set.

Help, Ron
 
You can simply use the max function with a group by clause

select project, max(date) from transaction_table
group by project
 
Thanks for the tip, the max gave me some problems, but also got me pointed in the right direction.

I ended up using a last function, then grouping, worked like a charm..

thanks, ron
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top