0

图片描述

2017-11-15 提问
5 个回答
0

已采纳
SELECT * FROM (
  select t.*, row_number() over(partition by trunc(buy_time), good_id order by buy_time desc) AS row1
  from TMP_T1 T
) WHERE row1 = 1
0

select * from table order by TIME desc

0

先排序后分组不行吗

0

select max(TIME) , GOODID from product group by GOODID

0

select goodid, max(time) from table group by goodid
用商品goodid分组 "group by goodid" 然后取time最大值 MAX(TIME)

撰写答案

你可能感兴趣的

推广链接