From the course: Advanced SQL: High Performance Relational Divisions

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Solution: Exact relational division

Solution: Exact relational division - SQL Tutorial

From the course: Advanced SQL: High Performance Relational Divisions

Start my 1-month free trial

Solution: Exact relational division

- [Instructor] The first obstacle is the one that I created with my own hands by using an inner join. I take full responsibility and will make it right. To find out whether a candidate has any extra skills, it might be helpful not to filter these out in the from clause. These additional skills didn't even make it to the other clauses. Unlike the ordinary relational division, we need these skills now. Therefore, we must designate candidate skills as a reserved table. This will return all of the candidate skills, whether required or not. It means we must change the inner joint to a left outer joint. Unfortunately, this change has a nasty side effect because if we execute the query now as is, we get an interesting result and those who watched my other courses know what I mean when I say interesting. Chen shows up as expected but somehow, Praveena managed to sneak in again and it's not a coincidence. The problem is…

Contents