Last answered:

17 Mar 2023

Posted on:

27 Nov 2022

1

Different query, same result

Hello,

I came up with the following query before checking the attached solution. The results are the same. Is there anything wrong with my query or is this just another way to get the same result?


SELECT 
    e.gender, COUNT(e.gender) AS quantity
FROM
    employees e
        JOIN
    titles t ON e.emp_no = t.emp_no
WHERE t.title = 'Manager'
GROUP BY e.gender
;
2 answers ( 0 marked as helpful)
Instructor
Posted on:

28 Nov 2022

0

Hi Zach!
Thanks for reaching out.

This is also a valid solution. Bravo!

Hope this helps.
Best,
Tsvetelin

Posted on:

17 Mar 2023

0

If I am not wrong, this is how the sql statements are written using the MS SQL. But whey when you you use the Oracle SQL, you don't have to specify the "JOIN" reserved word to indiacate a JOIN between columns of tow different tables, just an " = " sign in the WHERE Clause will do.

Submit an answer