Last answered:

08 Mar 2024

Posted on:

06 Mar 2024

0

Result not ordered by year

Below is my code, same as video but result is not ordered by the calendar year as seen in the video. What could be the issue

SELECT 
    YEAR(d.from_date) AS calendar_year,
    gender,
    COUNT(e.emp_no) AS num_of_employees
FROM
    t_employees e
        JOIN
    t_dept_emp d ON d.emp_no = e.emp_no
GROUP BY calendar_year , e.gender
HAVING calendar_year >= 1990;



1 answers ( 0 marked as helpful)
Instructor
Posted on:

08 Mar 2024

0

Hi Olanike!
Thanks for reaching out.


There is no issue. The default order is ascending if not specified.


Hope this helps.
Best,
Tsvetelin

Submit an answer