How can I optimize this query? It seems there should be a much easier way to do this. The goal is that it will still be able to be readily turned into a delete statement.
SELECT * FROM team
WHERE team_id IN (
SELECT team_id
FROM (
SELECT team.team_id, (
SELECT COUNT(*)
FROM signup
WHERE signup.team_id = team.team_id
) AS members
FROM team, schedule, event
WHERE team.schedule_id = schedule.schedule_id
AND schedule.event_id = event.event_id
AND event.event_id =183) AS t
WHERE members = 0
)