I am currently doing pset7 and I have found most of the clues of who it is but the problem is that I need to use the intersect sql function to find the common name of the thief but I am not sure how.
when I put the interest code and try to check for the intersection between all the statements. the terminal says "near "INTERSECT": syntax error"
I am not sure why I am a still a bit confused about sql and some of the commands if anyone could help that would be great
SELECT name FROM people JOIN courthouse_security_logs ON people.license_plate = courthouse_security_logs.license_plate WHERE year = "2020" AND day = "28" AND month = "7" AND hour = "10" AND minute >= "15" AND minute < "25" AND activity = "exit"; INTERSECT SELECT name FROM people JOIN bank_accounts ON people.id = bank_accounts.person_id JOIN atm_transactions ON bank_accounts.account_number = atm_transactions.account_number WHERE day = 28 AND month=7 AND atm_location="Fifer Street" AND transaction_type = "withdraw" ORDER BY name; INTERSECT SELECT name FROM people JOIN phone_calls ON people.phone_number = phone_calls.caller WHERE duration <= 60 AND day = 28 AND month = 7 AND year = 2020 ORDER BY name; INTERSECT SELECT name FROM people JOIN passengers ON people.passport_number = passengers.passport_number WHERE flight_id = ( SELECT id FROM flights WHERE month = 7 AND day = 29 AND year = 2020 ORDER BY hour,minute) ;