I have data in table as bellow
SERVICE_ID DATE_SEQ DAY_SEQ
101004 2012-10-18 1
101004 2012-10-19 2
101001 2012-10-20 3
101004 2012-10-21 4
I want query generate date show as range with date {From-to} it will group by Service id and date is sequence,if final it show as
output:
**Service_id** **From-To** **Date**
101004 2012-10-18 - 2012-10-19 1-2
101001 2012-10-20 - 2012-10-20 3-3
101004 2012-10-21 - 2012-10-21 4-4
try this