Example: Aggregate pushdown v2
MySQL Foreign Data Wrapper supports pushdown for the following aggregate functions:
- AVG - Calculates the average of a set of values.
- COUNT - Counts rows in a specified table or view.
- MIN - Gets the minimum value in a set of values.
- MAX - Gets the maximum value in a set of values.
- SUM - Calculates the sum of values.
Table on MySQL server:
Table on Postgres server:
The output: