WITH girl_i_guess_slate_voter AS (
SELECT
ballot_id
FROM
vote
INNER JOIN race ON vote.race_id = race.id
INNER JOIN option ON vote.option_id = option.id
WHERE
(race.race, option.option) IN (
('Thomas E. Hoffman (Vote For=1)', 'Yes'),
('David W. Ellis (Vote For=1)', 'Yes'),
('Stuart F. Lubin (Vote For=1)', 'Yes'),
('Kathy M. Flanagan (Vote For=1)', 'No'),
('Martin S. Agran (Vote For=1)', 'Yes')
)
GROUP BY
ballot_id
HAVING
COUNT(*) = 5
)
SELECT
COUNT(*)
FROM
girl_i_guess_slate_voter;