select * from logs INNER JOIN (select MIN(id) as min_id FROM logs GROUP BY user_id) test on `test`.min_id = logs.id
类似这样?
ZanderNg
2020-12-30 14:34:34 +08:00
select t1.* from (select t.a, t.b, t.c, row_number() over(partition by t.a order by to_number(b)) as rank from tgxt.test_a t where t.c is not null) t1 where rank = 1
select * from (select t.A, t.B, t.C, row_number() over(partition by t.C order by t.B) rn from TEST_ROW_NUMBER_OVER t) where t.B is not null and rn = 1; 这样吗?
第 1 页 / 共 1 页
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。