I'm curious if it is possible to do the following
select id from foo where foo.bar = (select SUM(bar) from foo )
without the use of a subquery.
Edit: To clarify, I'm trying to do this with postgresql, which does not appear to support the two solutions posted thus far.