SELECT * FROM Contributuions WHERE Official = @Official1 AND Contributor IN ( SELECT Contributor FROM Contributuions WHERE official = @Official2 GROUP BY 1 HAVING COUNT(*) > 1 )>>>Ok, this is making my head hurt. I've got a flat file that has campaign donation data from our local elected officials. I want to identify anyone who made a contribution to two officials. I want the users to be able to pick two officials and then run a select statement that will pull out all the people who have donated to both. I have tried unions, left outer, right outer, inner joins, etc. - nada.
>>SELECT * FROM Contributuions >> WHERE Contributor IN ( >> SELECT Contributor FROM Contributuions >> WHERE official = @Official1 or official = @Official2 >> GROUP BY 1 >> HAVING COUNT(*) > 1 >> )>