mysql查询过滤重复数据并随机取出记录

select *, count(distinct 字段) from table group by 字段  使用distinct过滤结果中的重复字段 spa select *, count(distinct 字段) from table group by 字段 order by rand() limit 5 过虑重复字段并随机取5条数据it
相关文章
相关标签/搜索