When I run this query by itself, it works fine. When I add it as a subquery, I get an error message. I'm trying to add a column that identifies those people who have only has one membership record. What's the deal with subqueries?
FROM Customer b INNER JOIN Membership a ON
b.Customer = a.Customer
EXISTS (SELECT Count(m.Membership), m.Customer
FROM Membership m
WHERE m.Customer = b.Customer
GROUP BY m.Customer
HAVING Count(m.Membership) = 1 ) )