📜  sql group by 并选择所有列 - SQL 代码示例

📅  最后修改于: 2022-03-11 15:05:13.837000             🧑  作者: Mango

代码示例1
select t1.*
from sch.mytable t1
join
(
    SELECT min(id) as id
    FROM sch.mytable 
    GROUP BY key
) t2 on t1.id = t2.id