Hey guys, I'm working on a job. I need sql statement for the following query: "List all Employees Names with equal ages." (If possible, along with their year of birth, or date of birth.)

Where does the age of the employee come from is it calculated using their DOB? use the GROUPBY clause to group the employees by age

Equal ages to what? Do you want groups of employees where each group has the same age? Do you want all employees matching a specified age? You can't write a query with vague terms.

ChrisHunter: Ya, the age is derived from DOB. Suggest me a sql statement using Group By clause then.
Deceptikon: I want groups of employees where each group has the same age. Is it possible to sort employees according to their age? ; and not by their Date of Birth?
Suppose Employees born between 1-Jan-1985 to 31-Dec-1985 should come under one group.
And the very next set would be employees born between 1-Jan-1986 to 31-Dec-1986.
That way.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.