|
Devart
Posting Yak Master
102 Posts |
Posted - 06/21/2010 : 06:42:27
|
Hi,for MS SQL Server 2005 or higher try it:
select appname,version,date_download from (select row_number() over(partition by au.appid order by au.date_download desc) as last_id, a.appname+'V'+au.version as appname, au.version, au.date_download from app_users au inner join [application] a on au.appid=a.appid ) s where last_id=1
Devart, Tools for SQL Server http://www.devart.com/dbforge/sql |
 |
|