查询no最小不重复数据
select min(no),tname,saleamount from 表名 group by tname,saleamount
查询no最小之外数据
mysql语句
select no,tname,saleamount from 表名 where no not in
(SELECT minid from (SELECT Min(id) as minid, CONCAT(tname,saleamount) as nameamont from 表名 GROUP BY nameamont))
其他数据库只要改CONCAT(tname,saleamount)就可以
参考sql拼接字段文档
https://blog.csdn.net/lchq1995/article/details/79425958