1
How to do
SELECT *
FROM usuarios
WHERE YEAR(nascimento) > 2000
How to filter parts of a date
Use the functions YEAR, MONTH, DAY
who take YEAR, MONTH, DAY of date field:
SELECT * FROM usuarios
WHERE YEAR(nascimento) = '2000' AND MONTH(nascimento) = '07' AND DAY(nascimento) = '07'
If it has more than 1 value:
SELECT * FROM usuarios
WHERE YEAR(nascimento) = '2018' AND MONTH(nascimento) IN ('07','09','11')
In a sequential interval:
SELECT * FROM usuarios
WHERE YEAR(nascimento) = '2018' AND MONTH(nascimento) BETWEEN '05' AND '12'
I made a db-fiddle if you want to add to the answer.
– fernandosavio
@fernandosavio opa claro!
– rbz