常用sql语句记录:

单字段去重

Select DISTINCT receipt_mobile From sr_order

说明: 查询所有receipt_mobile 重复的项,查询结果也就只有这一列

查询结果,根据指定字段及条件进行合并

` SELECT * FROM sr_order WHERE order_no in (select min(order_no) from sr_order group by receipt_mobile)`

说明: 合并查询结果中receipt_mobile相同的项,保留order_no最小的项