MYSQL实现分组排序并取组内第一条数据

  1、须要实现分组排序而且取组内状态优先级最高的数据 有一张这样的数据表, 需求是根据error_type分组而后取status最小的第一条数据html 第一种写法:post select t.* from ( select e.* from error_record e where e.status > 0 and e.error_type > 0 order by ) t group
相关文章
相关标签/搜索