Last answered:

17 May 2023

Posted on:

19 Mar 2023

0

Solutions do not correspond to the task

They return not the nuber of male employees, but the number of their contracts.

Also not all employees from employees table have at least a note in salaries table. Should they be counted as "never had a hight salary"?


UPD: You literally have correct solution in the next assignment

4 answers ( 0 marked as helpful)
Posted on:

19 Mar 2023

0

And how do I even do the Q3 without a cross join? You're using one.

If I'm allowed to use cross join in Q3, what's the difference between Q3 and Q4?


Instructor
Posted on:

08 Apr 2023

0

Hi Nick!


Thanks for reaching out.

Can you please provide a link/explanation to what you are referring to Q3 and Q4 so that we are sure we are all on the same page? Thank you.


Looking forward to your answer.
Best,
Martin

Posted on:

08 Apr 2023

0

Sorry, by Q3 and Q4 I meant Exercise 3 and Exercise 4.

In the solution for  Exercise 3 table "a" is joined without a condition. Does it not make it a cross join?

The only 2 differences between Exercise 3 and Exercise 4 are CTE usage and an additional "CROSS"

Also, the Exercise 4 statement says not to use CTEs

Instructor
Posted on:

17 May 2023

0

Hi Nick!


Please excuse us for missing to reply back to your question on time.

In MySQL, in situations in which there will be no overlap between the records from the two tables to be joined (or the two datasets, i.e. - tables, or CTEs, for example), whether or not we use a join or a cross join would lead to an identical output. This is the case with Exercise 3 and 4, and we asked you to use a Cross join in particular both to explore this technique as well as remind you of the code used throughout the lectures.

Please note that using a cross join is not the only difference between the two solutions - focus on using the common table expressions as well!


Hope this helps.

Kind regards,
Martin


Submit an answer