Something wrong with this exercise
I guess either the exercise statement is something vague or missing in that
as far I understand (we have to find all the numbers of employees on that date on which more than one joining/contract was signed)
is this correct I guess the exercise question needs to more clear than
second in the exercise solution we used (group by emp_id) but why?? as far as I know group by is used to make similar things in group and remove any duplicacy but the emp_no column already distinct in itself
is this group by you used just to make use of having in the query
Thanks for reaching out.
Yes, you are right. The exercise is about selecting the employee numbers of all individuals who have signed more than 1 contract after the 1st of January 2000. We need to use the GROUP BY clause because otherwise the result set will be only one row - the first record that matches the condition.
Hope this helps.