i have table which include my product table’s logs like that:
process_time product_id product_type_id
04.07.2009 14:08:43 5 4
05.07.2009 15:08:43 5 4
06.07.2009 16:08:43 5 6
07.07.2009 16:08:43 5 6
08.07.2009 17:08:43 5 4
08.07.2009 18:08:43 5 4
I want to write a query which shows the changes of product_type_id. For the example above, the result of my query should be like that:
process_time product_id product_type_id
04.07.2009 14:08:43 5 4
06.07.2009 16:08:43 5 6
08.07.2009 17:08:43 5 4
How can I write this query?
Like this:
For all who like to see how this works:
Executed we get: