sql select distinct but return all columns