Collection Contents Previous Next PDF

ASA SQL User's Guide

Using OLAP

Understanding subtotals


Subtotal rows can help you analyze data, especially if there are large amounts of data, different dimensions to the data, data contained in different tables, or even different databases altogether. For example, a sales manager might find reports on sales figures broken down by sales representative, region, and quarter to be useful in understanding patterns in sales. Subtotals for the data give the sales manager a picture of overall sales from different perspectives. Analyzing this data is easier when summary information is provided based on the criteria that the sales manager wants to compare.

With OLAP, the procedure for analyzing and computing row and column subtotals is invisible to the end-user. The following diagram shows conceptually how Adaptive Server Anywhere creates subtotals:

The process by which Adaptive Server Anywhere calculates subtotals and adds them to the result set. This three-step process is invisible to the end-user.
  1. This step yields an intermediate result set. The query is tabulated according to the conditions set out in it.

  2. OLAP creates the subtotals and attaches them to the result set.

  3. The rows are arranged according to the ORDER BY clause in the query.

Note 
This sequence is seamless to the end-user.

About OLAP operations

Collection Contents Previous Next PDF