MySQL Query to find the age of a person whose date of birth is stored in a column called “dob” in a table called “persons”
SELECT TIMESTAMPDIFF(YEAR, dob, CURDATE()) AS age FROM persons; This query will return the age in years. If you want to …
Read More
Read More
How to use the GROUP BY and HAVING clauses in a SELECT statement?
The GROUP BY clause in a SELECT statement is used to group rows in a table based on one or …
Read More
Read More