I am getting an ORA-00907 error when I try to parse this statement. Any ideas on what I am doing wrong?
Thanks in advance!
DELETE
FROM teams
WHERE is_old=0
AND tm_counter NOT IN (SELECT MIN(dup.tm_counter)
FROM teams AS dup
GROUP BY dup.name, dup.squad, dup.region);
In Oracle, you can’t use
ASbefore a table alias, only before a column alias. So, change this part:to this: