i want to make a query::::
plz help
i have a table:::: temp
A B
1 a
2 a
3 a
4 a
5 b
6 b
7 b
8 a
9 a
10 b
11 b
i want the output to be
From to B
1 4 a
5 7 b
8 9 a
10 11 b
so plz help me......i m not getting the answer
i have made like this
select min(A),max(A),B from temp group by B;
but it is giving me
1 9 a
5 11 b