I am trying to delete all records that are not the latest version under their name, but apparently you cannot reference access to the table that you are editing in the same query.
I tried this, but it does not work for the reasons above:
DELETE FROM table
WHERE CONCAT(name, version ) NOT IN (
SELECT CONCAT( name, MAX( version ) )
FROM table
GROUP name
)
How can I get around this?
Greetings
source
share