How to write a statement that groups data by date but shows when data changed for the first time
date - when data changed
a,b,c - some data and it can be anything
date,a,b,c
04/26/2008,1,1,1
04/25/2008,1,2,1
04/24/2008,1,1,1
04/23/2008,1,1,1
04/22/2008,1,1,1
04/21/2008,2,2,2
04/20/2008,1,1,1
This is should be the result. It might have the same data on different dates, but it missing the next day when data stayed the same.
04/26/2008,1,1,1
04/25/2008,1,2,1
04/22/2008,1,1,1
04/21/2008,2,2,2
04/20/2008,1,1,1
It should work on MS SQL Server 2008 r2