Answers for "sql group by and select all columns"

SQL
0

sql group by and select all columns

select t1.*
from sch.mytable t1
join
(
    SELECT min(id) as id
    FROM sch.mytable 
    GROUP BY key
) t2 on t1.id = t2.id
Posted by: Guest on September-13-2021

Code answers related to "SQL"

Browse Popular Code Answers by Language