0

5个回答

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)

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

撰写答案