我是Amazon Redshift的新手。我正在尝试对事件进行分类,并根据事件值汇总事件和序列ID。在这里,我给出了示例输入和输出格式。
输入:
session_id|events| seq_id|users
100 appLaunch 1 20
100 appLaunchTrack 2 30
100 appLaunchTrack 3 40
100 videoRequest 4 100
100 channelChange 5 60
100 channelRequest 6 70
100 appLaunchTrack 7 80
100 appLaunchTrack 8 90
100 appLaunchTrack 9 100
100 appLaunchTrack 10 110
100 appLaunchTrack 11 120
101 appLaunch 1 130
101 appLaunchTrack 2 140
101 videoRequest 3 1 100
101 appLaunchTrack 4 160
101 appLaunchTrack 5 170
输出:
session_id|events|seq_id|users
100 appLaunch 1 20
100 appLaunchTrack 2 70
100 videoRequest 4 50
100 channelChange 5 60
100 channelRequest 6 70
100 appLaunchTrack 7 500
101 appLaunch 1 130
101 appLaunchTrack 2 140
101 videoRequest 3 150
101 appLaunchTrack 4 330
请帮助我解决此问题。 预先感谢。