I have table T as:

[![enter image description here](https://i.stack.imgur.com/9bNOW.png)](https://i.stack.imgur.com/9bNOW.png)

So,I got sql from somewhere as:

```
select * from (
SELECT start_range,(LEVEL + START_RANGE)-1 NUM,end_range
   FROM offc.T
  CONNECT BY (LEVEL +START_RANGE ) <= END_RANGE+1) order by start_range,num,end_range;

```

I got output as:

[![enter image description here](https://i.stack.imgur.com/H7IbB.png)](https://i.stack.imgur.com/H7IbB.png)

I am describing how is this query running now:

At first level=1 so,
start\_range=1 and end\_range=3 and it loops upto 1 to 3;
So,the output is:

```
start_range | num | end_range
   1          1       3       2<=4,level=1
   1           2       3      3<=4,level=2
   1           3       3      4<=4,level=3
and the new start_range=5 and end_range=5.

```

But,I am getting confuse how is this loop going on? I am seeing large no of
rows which has 1 2 3 data as:

[![enter image description here](https://i.stack.imgur.com/W4SrG.png)](https://i.stack.imgur.com/W4SrG.png)

How is this 1 2 3 rows coming more than once ? Can anyone help me to understand the flow of this sql?