select
s.*
from
(
select
*, row_number() over (partition
by
指定按哪些字段进行分组,这些字段值相同的记录将在一起编号
order
by
则是指定在同一组中进行编号时是按照怎样的顺序)
as
group_idx
from
table_name
) s
where
s.group_idx = 1
2023-09-26 23:21:58
select
s.*
from
(
select
*, row_number() over (partition
by
指定按哪些字段进行分组,这些字段值相同的记录将在一起编号
order
by
则是指定在同一组中进行编号时是按照怎样的顺序)
as
group_idx
from
table_name
) s
where
s.group_idx = 1