I'm trying to delete rows from a table using the difference between the current date and the date the row was registered as a reference. Here's my code:
DELETE FROM lixeira
WHERE diferenca > 60 IN
(
SELECT DATEDIFF('2018-11-20',data_exclusao) AS diferenca
FROM lixeira
)
Since "data_exclusion" is the column that stores the data date of the row data. But the console is returning me the following error: