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.
On
In your query you can use analytic functions ROW_NUMBER() and DENSE_RANK() and your SQL query it would like this:
SELECT date_, name, last_version FROM (SELECT date_, name, last_version,
ROW_NUMBER() OVER (PARTITION BY last_version ORDER BY date_ ASC) as row_num,
DENSE_RANK() OVER( ORDER BY last_version DESC) as d_rank
FROM <your_table>) WHERE d_rank = 1 and row_num = 1
You can see here SQL query result:
db<>fiddle: https://dbfiddle.uk/?rdbms=oracle_18&fiddle=0fd33a31bdbd807926de8b2489e2883b
You could do something like: