Skip to main content

MERGE

Descriptionโ€‹

The aggregated intermediate results are aggregated and calculated to obtain the actual result. The type of the result is consistent with AGGREGATE_FUNCTION.

Syntaxโ€‹

AGGREGATE_FUNCTION_MERGE(agg_state)

Exampleโ€‹

mysql [test]>select avg_merge(avg_state(1)) from d_table;
+-------------------------+
| avg_merge(avg_state(1)) |
+-------------------------+
| 1 |
+-------------------------+

Keywordsโ€‹

AGG_STATE, MERGE

Enter to send ยท Shift+Enter for a new line