海神


Order By之后去重

2014-09-22

参考:http://stackoverflow.com/questions/15549174/select-distinct-records-based-on-one-field-while-keeping-other-fields-intact

select max(id), address, max(date) as latest 
       from searches 
       group by address 
       order by latest desc

blog comments powered by Disqus