Transform Dates into Date Range in MYSQL---how to handle gaps in the dates
问题 I am looking for a help in transforming below data into the required output. We have data at Item,LOC DAY level data which needs to be transformed to Item,Loc Date Range to reduce the number of records in the table and for other requirements. Item LOC RP_DATE RP_IND 1003785256 543 2016-11-05 Y 1003785256 543 2016-11-06 Y 1003785256 543 2016-11-07 Y 1003785256 543 2016-11-09 Y 1003785256 543 2016-11-10 Y 1003790365 150 2016-11-05 Y 1003797790 224 2016-11-05 Y 1003797790 224 2016-11-06 Y