I am trying to find the range in following problem
I have a table named my_tble(id varchar(100),roll_no varchar(100)) with following values.
-------------------
|id | roll_no |
-------------------
| 001 | 1 |
| 002 | 2 |
| 003 | 3 |
| 004 | 4 |
| 005 | 7 |
| 006 | 8 |
| 007 | 11 |
| 008 | 15 |
| 009 | 16 |
| 010 | 17 |
-------------------
Output should be in this way:
-----------
|roll_no |
---------
| 1-4 |
| 7-8 |
| 11-11 |
| 15-17 |
-----------