【发布时间】:2021-12-08 19:26:02
【问题描述】:
我有如下数据:
item day
a 1
b 1
c 1
a 2
c 2
d 2
a 3
d 3
而想要的结果是查找对于每一天,在这一天之前消失的记录。期望的结果:
disappeared_item day_of_interest
b 2 (as of the second day, only b disappeared)
b,c 3 (as of the fourth day, b and c disappeared)
我想找出每个项目的最大(天),但在如何获取每天累积的项目方面得到了堆栈
【问题讨论】:
标签: mysql sql data-manipulation presto