mysql group by 排序分組

select * from 表名 (select * from 表名 order by 字段名 desc|asc limit 999) as 數據表別名 group by 字段名;mysql 注意:1.mysql 5.7 使用這種用法 order by 後面要加limit;sql         2.子查詢後面要有數據表別名。it
相關文章
相關標籤/搜索