【发布时间】:2020-06-01 13:51:59
【问题描述】:
假设这张表的最后 7 天:
Userid Download time
Rab01 2020-04-29 03:28
Klm01 2020-04-29 04:01
Klm01 2020-04-30 05:10
Rab01 2020-04-29 12:14
Osa_3 2020-04-25 09:01
以下是所需的输出:
Count Download_time
1 2020-04-25
2 2020-04-29
1 2020-04-30
【问题讨论】:
-
对于
Download_time,计数应该是 1 对吧?是不是打错字了? -
是的,对不起....更正了。
标签: sql postgresql amazon-redshift distinct aggregate-functions