20.1. Running the SELECT Command in DuckDB (axe.query) #
The axe.query stored procedure is useful when the DuckDB syntax makes the command easier to write or to use a function that is not supported by the analytics engine yet.
Required privileges: Superuser or the Postgres Pro AXE administrator.
For more information about access management, refer to Chapter 12.
Execute the following command on the Postgres Pro AXE server:
SELECT * FROM axe.query('command');
Where command is the SELECT command that must be executed.
Postgres Pro AXE will return the result as rows.
Example 20.1. Running the SELECT Command in DuckDB
Using the DuckDB PIVOT syntax that is not valid in Postgres Pro:
SELECT * FROM axe.query('
PIVOT sales_summary
ON product_category
USING SUM(total_sales)
GROUP BY region;
');