From 5d7a128204108ca96b6a35a4c43ed01de24b0bb8 Mon Sep 17 00:00:00 2001
From: Fudgerboy <91767657+Fudgerboy@users.noreply.github.com>
Date: Mon, 20 May 2024 11:28:00 +0000
Subject: Mon, May 20, 2024, 4:28 AM -07:00

---
 wk7/pset/movies/11.sql | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

(limited to 'wk7/pset/movies/11.sql')

diff --git a/wk7/pset/movies/11.sql b/wk7/pset/movies/11.sql
index fd4ade1..4162617 100644
--- a/wk7/pset/movies/11.sql
+++ b/wk7/pset/movies/11.sql
@@ -1,10 +1,14 @@
 SELECT title
 FROM movies
-JOIN ratings ON movies.id = ratings.movie_id
-WHERE person_id = (
-    SELECT id
-    FROM people
-    WHERE name = "Chadwick Boseman"
+-- JOIN ratings ON movies.id = ratings.movie_id
+WHERE id IN (
+    SELECT movie_id
+    FROM ratings
+    WHERE person_id = (
+        SELECT id
+        FROM people
+        WHERE name = "Chadwick Boseman"
+    )
 )
 ORDER BY rating
 ;
-- 
cgit v1.2.3

