From the course: Advanced SQL: Logical Query Processing, Part 2

Unlock the full course today

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

Challenge

Challenge - SQL Tutorial

From the course: Advanced SQL: Logical Query Processing, Part 2

Start my 1-month free trial

Challenge

- [Instructor] Your challenge for this chapter is to show breeds that were never adopted. It is not the animals that were not adopted. It's the breeds that were not adopted. And this may sound like a minor change but trust me, it is not. There is a fundamental logical difference between these two questions. Breed isn't an animals identifier. We have more than one animal of the same breed. Moreover, none breed animals have null for breed, which throws another monkey wrench into the query. A few tips. We have none breed dogs and none breed cats. So remember, you must consider species as well. Breed alone is not enough. I'll give you the answer for the sample data. The only breed that was not adopted is a Turkish Angora cat. This is going to help you a lot identify any wrong solutions. Before you attempt to use set operators, I ask that you try some of the techniques we just used to find animals that were never adopted and…

Contents