Search code examples
sqldatebq

Find date of the change in Last version


enter image description here

I'm trying to show the date where the last version changed - for example in customer ACA.. the version changed in 12/5/2022

BTW, I have more than one customers.


Solution

  • You could do something like:

    SELECT MIN(date)
        , name
        , last_version
    FROM Datatable
    GROUP BY name, last_version