From eccc08693b0498d8e5646cbfb850ad86e1871129 Mon Sep 17 00:00:00 2001
From: Fudgerboy <91767657+Fudgerboy@users.noreply.github.com>
Date: Tue, 21 May 2024 08:51:48 +0000
Subject: Tue, May 21, 2024, 1:51 AM -07:00

---
 wk7/pset/fiftyville/log.sql | 24 +++++++++++++++++++++++-
 1 file changed, 23 insertions(+), 1 deletion(-)

(limited to 'wk7/pset/fiftyville/log.sql')

diff --git a/wk7/pset/fiftyville/log.sql b/wk7/pset/fiftyville/log.sql
index e7b97e6..b1fe3e5 100644
--- a/wk7/pset/fiftyville/log.sql
+++ b/wk7/pset/fiftyville/log.sql
@@ -173,6 +173,7 @@ AND id IN (
 ;
 -- BRUCE is the thief
 
+-- Get phone number of accomplice
 SELECT receiver
 FROM phone_calls
 WHERE caller = (
@@ -183,6 +184,27 @@ WHERE caller = (
 AND year = 2023
 AND month = 7
 AND day = 28
-AND duration = 10
+AND duration < 60
 ;
+-- "(375) 555-8161"
 
+-- Get name of accomplice from their phone number
+SELECT name
+FROM people
+WHERE phone_number = (
+    SELECT receiver
+    FROM phone_calls
+    WHERE caller = (
+        SELECT phone_number
+        FROM people
+        WHERE name = "Bruce"
+    )
+    AND year = 2023
+    AND month = 7
+    AND day = 28
+    AND duration < 60
+)
+;
+-- ROBIN is the accomplice
+
+-- :3 Miau
-- 
cgit v1.2.3

