0

Hello,

If I have a table like this where i have the year and the month, how can a get something like 2008 3 after a select? - I mean the maximum month for the maximum year?

Thank you.

year       month
2006	     1
2007	     1
2006	     2
2007	     2
2006	     3
2007	     3
2008	     3
2006	     4
2007	     4
2006	     5
2007	     5
2006	     6
2007	     6
2006	     7
2008	     3
2007	     7
2006	     8
2007	     8
2006	     9
2007	     9
2
Contributors
1
Reply
2
Views
9 Years
Discussion Span
Last Post by Seemant
0

As you give the information in the table
you can find it by:-

select * from Test as t1
where 0=(select count(*) from Test as t2
where t1.Year<t2.Year)
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.