2.12 分组:计数

 

有日销售统计表如下所示,请算出每种产品日销售额超过 1000 的天数。

Date Product Sales
2022-01-01 00:00:00 Cereal 98.0000
2022-01-01 00:00:00 Meat 174.0000
2022-01-02 00:00:00 Cereal 168.0000
2022-01-02 00:00:00 Meat 167.4000
2022-01-03 00:00:00 Cereal 1696.0000

脚本:

A
1 =T(“DailySales.xls”)
2 =A1.groups(Product;count(Sales>1000):Days)

运行结果:

Product Days
Cereal 10
Meat 5