postgres=# select distinct on (col1) col1,col2,col3 from test order by col1; col1 | col2 | col3 ------+------+------------ 1 | abc | 2015-09-10 2 | xyz | 2015-09-13 3 | tcs | 2015-01-15 (3 rows)