hello im new with sql, i only know this queries to count age but i have task to show all record with conditon age >20
select*, year(curdate()) - year(dob) as age from user
Consider that someone born in 2000 is not 20 yet if their birthday occurred in June or later month. Also, that someone born in May is 20 if their birthday was yesterday, but not if it was on the 29th.
17 People are following this question.