Question: Consider a database which contains people and their respective residence histories: Which of the following queries will return all the people that have never lived

Consider a database which contains people and their respective residence histories:
Which of the following queries will return all the people that have never lived in Boston? Select all that apply.
SELECT p.*
FROM people p
JOIN residence_history r ON p.person_id = r.person_id
WHERE r.city > 'Boston'
SELECT p.*
FROM people p
LEFT JOIN residence_history r ON p.person_id = r.person_id
WHERE r.city > 'Boston'
SELECT p.*
FROM people p
WHERE NOT EXISTS
(
SELECT *
FROM residence_history r
WHERE p.person_id = r.person_id AND city = 'Boston'
 Consider a database which contains people and their respective residence histories:

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!