So I have this database table with some records and I would like to only select a row if its different from previous based on few columns ( C1, C2, C3 ) .. ignoring date and all other columns .. I want to check against these 3 columns and bring only a row if its different from previous. Need some help here.
Name C1 C2 C3 Date
Test Y Y Y 10/23/2017 0:00:00
Test Y Y Y 10/24/2017 0:00:00
Test N Y Y 10/25/2017 0:00:00
Test Y Y N 10/26/2017 0:00:00
Test Y Y N 10/27/2017 0:00:00
Test Y Y Y 10/28/2017 0:00:00
Test Y Y Y 10/30/2017 0:00:00
The result I want is should be like this:
Name C1 C2 C3 Date
Test Y Y Y 10/23/2017 0:00:00
Test N Y Y 10/25/2017 0:00:00
Test Y Y N 10/26/2017 0:00:00
Test Y Y Y 10/28/2017 0:00:00