I'm thinking of starting with some kind of join of the table or something, against itself. But I'm not sure how I'd do it right off the top of my head. We're having a wine tasting at work right now and I'm not at my most lucid. I'll think about it a bit and try it later when I'm not quite so tipsy.
something like:
select a.id, a.reply_id, b.id, b.reply_id from table a join table b on (a.id=b.reply_id)
and wrapping that in an outer select with a distinct.