Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Using Intermediate Max & Min

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-05-28 : 23:54:35
Kaleb writes "Lets say we have a product with an ID, Version #, Date of Version #. Each ID can have several Versions that corresponds with a Date. I would like to output the ID with the highest version number and the date that corresponds with the ID and the lowest Version number.

EX.

PRODUCT VERSION DATE

widget1 5.5 5/20/99
widget1 7.6 6/30/99
widget2 2.2 6/22/99
widget2 3.8 8/3/99

Return
widget1, 7.6, 5/20/99
widget2, 3.8, 6/22/99""
   

- Advertisement -