【发布时间】:2020-09-22 19:45:09
【问题描述】:
我想为每个
merchant_id获取每月number_of_listings的平均数量。下表显示了每个
merchant_id的每日number_of_listings
主表
date merchant_id number_of_listings
2019-02-01 12 325
2019-02-02 12 332
2019-02-03 12 235
2019-02-04 12 393
2019-02-05 12 484
2019-02-06 12 383
2019-02-07 12 434
输出表
month merchant_id average_number_of_listings
2019-02 12 400
【问题讨论】:
标签: sql average aggregate-functions presto date-arithmetic