To get a postgresql behavior similar to mysql's you need to use distinct on:
select distinct on (a) a,b,c from sometable; (or something like that)