I like a simple solution.

-- DDL, create table
create table #tbl(CountryName varchar(24), [Value] int, [Year] char(4)); 

-- DML, populate data
insert into #tbl(countryName,[Value],[Year])
values ('Sweden', 80, '1970'); 
insert into #tbl(countryName,[Value],[Year])
values('Sweden', 20, '1999');
insert into #tbl(countryName,[Value],[Year]) 
values ('Denmark', 10, '1962');
insert into #tbl(countryName,[Value],[Year]) 
values('Denmark', 15, '1992');

-- DML, get sucker
select top 2 *
from #tbl
order by [Year] desc;


Li, Chunshen (Don)
[EMAIL PROTECTED]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Host with the leader in ColdFusion hosting. 
Voted #1 ColdFusion host by CF Developers. 
Offering shared and dedicated hosting options. 
www.cfxhosting.com/default.cfm?redirect=10481

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to