Write a query to compare consecutive rows in each customer’s customer_snapshots history for plan, city and credit_limit.
Return one row for each field that changed, with the current customer_id, current snapshot_id, the field name, and old_value and new_value as text. The first snapshot produces no rows.
A value-to-NULL or NULL-to-value transition is a change; NULL-to-NULL is not. Report only the individual fields that differ, rather than every field in a changed snapshot.
Ordering: Sort by customer_id, then snapshot_id, then field, all ascending.