IBM® Informix® Warehouse Accelerator, Version 12.10

Query block example: Average employee sales

This example of a query uses OLAP window aggregation functions.

In this example, Informix® Warehouse Accelerator processes the join between the employee and sales tables, and then returns the result set to the Informix database server. The Informix database server then processes the OLAP functions, RANK and AVG.

SELECT e.emp_name,
           RANK() OVER (PARTITION BY region
                                 ORDER BY total_sales desc),
           AVG(sales) OVER (PARTITION BY region, year)
FROM employee e, sales s
WHERE e.emp_id = s.emp_id;


Examples exchange | Troubleshooting

To find the PDF, see Publications for IBM Informix Warehouse Accelerator 12.10.
For the release notes, see the Release Notes topic.
timestamp Release date: March 2015