http://qs321.pair.com?node_id=664272


in reply to (OT) Exclusion selection on DBI

Obviously not a perl question, however:
select fruit, color from fruit_table where fruit in (select fruit from fruit_table group by fruit having count(*) > 1) order by fruit
should normally work (untested, though).

Michael

Update: moritz's solution is cleaner (and probably faster, if it matters), but has an additional column in the result set (which probably doesn't matter, so a better solution overall :-)