EXISTS and subqueries that look outside
Write correlated subqueries that run once per row, and use EXISTS and NOT EXISTS to find users who never posted or follows nobody returned.
- The skill
- Ask yes or no questions about related rows, once for every row.
- You make
- Follower counts, silent users and unliked posts on a photo and video app.
Premium lesson
£7.99 a month or £59 a year. Cancel any time.
Builds on 19 Queries inside queries. Free to try: SQL Foundations and the playground.
Passed
You can now
Step 1 of 9
exercise_1.sql
You've reached the good stuff.
6 exercises in this lesson, checked as you type. Premium opens every lesson after Foundations, in all four courses.
SQLite