Hi All,
Below is the table columns and data in it.
ID AMT
----------------------
1 100
2 150
3 170
4 200
5 200
6 240
7 280
8 343
9 354
10 390
Now I need to display result like below
Amt Range Count
-----------------------------------
100-200 3
200-300 4
300-400 3
Please let me know the right SQL for this. Please note that I have given only sample of data here. Data could be in any range of amount.
Let me know if you need more information on this.
Below is the table columns and data in it.
Code:
select * from cumtemp;
----------------------
1 100
2 150
3 170
4 200
5 200
6 240
7 280
8 343
9 354
10 390
Now I need to display result like below
Amt Range Count
-----------------------------------
100-200 3
200-300 4
300-400 3
Please let me know the right SQL for this. Please note that I have given only sample of data here. Data could be in any range of amount.
Let me know if you need more information on this.
Comment