小编m3a*_*smi的帖子

如何使用隐式 DISTINCT 创建聚合函数,如 sum?

我们有一个 ERP 系统,它允许使用聚合(例如SUM(foo))但不允许使用 DISTINCT(例如SUM(DISTINCT foo).

是否可以创建一个聚合函数 ( SUM_DISTINCT),它返回与 相同的结果SUM(DISTINCT foo),所以SUM_DISTINCT(foo) = SUM(DISTINCT foo)

postgresql aggregate distinct

6
推荐指数
1
解决办法
3302
查看次数

标签 统计

aggregate ×1

distinct ×1

postgresql ×1