Last answered:

13 Sept 2023

Posted on:

28 Aug 2023

0

Resolved: i overwhelmed by understanding task 2

i really cant understood this query which was in task 2 i wish someone could teach me properly

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

28 Aug 2023

0

Hi Aadil!
Thanks for reaching out!

In the SELECT statement we choose what to display. The reason why CROSS JOIN is used is because in the nested query we are obtaining a year and we cannot join it to any other column from the other tables, thus we need a cross join to achieve that. Then, we join this result for each year with the other three tables. Also, we use the CASE statement in order to find if an employee is active.


Hope this helps.
Best,
Tsvetelin

Posted on:

31 Aug 2023

0

thank you sir now i understood why we used CASE statement

Instructor
Posted on:

13 Sept 2023

0

Hi Anas!


You are very welcome!


Best,
Tsvetelin

Submit an answer