I have one table with the following Column.
BoxNumber Status
580 4
581 4
582 4
583 4
584 2
585 2
586 4
587 4
588 4
589 4
590 2
591 2
I need one select Query to get the following output .
StartingBoxNumber EndingBoxNumber Status
580 583 4
584 585 2
586 589 4
590 591 2