I am using SQL Server 2008 R2 and I have a table with the columns:
The table contains more than one billion rows.
I need to delete unchanged data between changed values and keep changed, previous and next rows (when sorted by
ctime) with the values for any
cid. So for example, in the results below, I would want to delete the records highlighted in red boxes:
How should I go about doing this?