0
Good afternoon, I am displaying a report, where it is to show customers who own + 60 years.
Like me nay own a field idade
in the comic book, I had to "discover it" by birth date and did so:
SELECT TIMESTAMPDIFF(YEAR, data_de_nascimento, CURDATE()) as idade FROM clientes
Now I need to specify on select
, that I just want you to show who’s over 60.
I tried to put
WHERE idade >= 60
but it didn’t work.
I’m trying to compare to date of birth with the year of 1960 (2020 - 1960 = 60), but I want to take the day and the current month, so I don’t have to keep switching and have a "flawless" search, but I’m not getting... I’m trying this way:
WHERE data_de_nascimento <= '1960-Month(data)-Day(now))'
Someone can help me?