Questions tagged «aggregate»

将多个数据点合并为一个数据点。通常用于引用SQL,通常用于某种聚合函数。

3
如何创建用户定义的聚合函数?
我需要一个MySQL不提供的聚合函数。 我希望它具有MySQL的SQL风格(即不是C语言)。 我该怎么做呢?我所坚持的是创建一个聚合函数-这些文档似乎没有提到它是如何完成的。 所需的product功能用法示例: mysql> select product(col) as a from `table`; +------+ | a | +------+ | 144 | +------+ 1 row in set (0.00 sec) mysql> select col, product(col) as a from `table` group by col; +-----+------+ | col | a | +-----+------+ | 6 | 36 | | …
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.