I have following table:
day cat x1 x2
2019-10-25 A P Open
2019-10-26 A P Close
2019-10-27 A P Close
2019-10-28 A I Close
2019-10-26 B P Close
2019-10-27 B P Open
2019-10-28 B P Open
How can I get rows where either "x1" or "x2" has changed within a category "cat"?
day cat x1 x2
2019-10-26 A P Close
2019-10-28 A I Close
2019-10-27 B P Open
I have found some questions with one column changed, but struggling a bit with categorized table and capturing changes from two columns
SQL Serveryou are using ?SQL Serverversion - v18.1SQL Server Management Studio. Not theSQL Server. Do aprint @@versionto seeMicrosoft SQL Azure (RTM) - 12.0.2000.8