34,571
社区成员
发帖
与我相关
我的任务
分享
select * from 表 as a where not exists(select * from 表 where 名称=a.名称 and id<a.id)
select * from 表名 group by 分类
select distinct 名称 from table
select id,名称,个数,distinct 分类 from table
SELECT * FROM TB T WHERE exists(select 1 from (SELECT MIN(ID) as mid FROM TB group by 分类 ) z
WHERE z.mid=T.id )
select * from 表名 group by 分类