2.10 分组:求最大最小值

 

有日销售统计表如下所示,请算出每种产品销售额最大 / 最小的那天的销售额是多少?

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;max(Sales):Sales)
3 =A1.groups(Product;min(Sales):Sales)

A2 运行结果:

Product Sales
Cereal 1696
Meat 3000

A3 运行结果:

Product Sales
Cereal 98
Meat 75