0

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.)

3
Contributors
3
Replies
5
Views
4 Years
Discussion Span
Last Post by bnitishpai
0

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

0

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.

0

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.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.