
266 9.4 Specialized Analytical Syntax
AND s.location_id = l.location_id
AND s.industry_id = i.industry_id
AND s.product_id = p.product_id;
If we did something a little simpler, such as a SUM aggregation, then
the WITH clause could be useful, but perhaps still not as effective as using
real analytical capabilities by utilizing the OVER clause, as shown by the
query in Figure 9.10. In Figure 9.10, we are retrieving all summary aggrega-
tions whose summation is greater than 1% of the total aggregation for the
entire SALE fact table.
9.4.3 CASE and Cursor Expressions
CASE and cursor expressions allow CASE statements and typecasted cursor
executions to be embedded ...