http://www.perlmonks.org?node_id=1173419


in reply to How many different varieties (color, size, etc) of socks do you have in your sock drawer?

SELECT l.sock, r.sock FROM socks r, socks l WHERE l.sock LIKE r.sock and l.sock <> r.sock LIMIT 1;