Welcome to TDBSoverflow, Our class's own StackOverflow. Our rules:
  1. Use only meaningful and self-explanatory titles
  2. Tag your questions with meaningful keywords
  3. Use upvotes and downvotes to rate the answers
  4. When you receive a satisfying answer - Click the "V" button
Remember: you may get up to 5 bonus points to your final grade!

2016 Moed A, Q1Biii join condition

0 votes
26 views
Hi all,

In the exam from 2016, moed A, question 1, part b, subsection iii, we are asked to write a query that retrieves all the chefs that won at least once and haven't lost once in a show with a theme that is their speciality without using INTERSECT, EXCEPT, EXISTS and IN using only R/L JOIN and a FULL OUTER JOIN.

Whilel I do understand the usage of a LEFT JOIN in the solution the ON condition seems to be contradictory:

 A.id = B.id AND B.id = NULL

This seems weird because if both conditions hold it means that both id's are NULL and because we know that there are no NULL values in the table it means that nothing will be returned.

Perhapbs the condition should be A.id <> B.id OR B.id = NULL?

Thanks
asked Feb 4, 2018 by uribracha (3,110 points)

1 Answer

+1 vote
 
Best answer
I can't answer questions without references , but I welcome other students to do so! good luck :-)
answered Feb 4, 2018 by Amit (27,910 points)
selected Feb 5, 2018 by uribracha
Uri, please see my previous answers to you.
Good luck!
...