xvi
Sample Linear Regression Calculation ............................................................................... 22-30
Statistical Aggregates.................................................................................................................... 22-30
Descriptive Statistics.............................................................................................................. 22-31
Hypothesis Testing - Parametric Tests ............................................................................... 22-31
Crosstab Statistics .................................................................................................................. 22-31
Hypothesis Testing - Non-Parametric Tests ...................................................................... 22-31
Non-Parametric Correlation................................................................................................. 22-32
User-Defined Aggregates............................................................................................................. 22-32
Pivoting Operations............................................................................................................................ 22-33
Example: Pivoting......................................................................................................................... 22-33
Pivoting on Multiple Columns.................................................................................................... 22-34
Pivoting: Multiple Aggregates.................................................................................................... 22-34
Distinguishing PIVOT-Generated Nulls from Nulls in Source Data .................................... 22-35
Unpivoting Operations ................................................................................................................ 22-35
Wildcard and Subquery Pivoting with XML Operations ....................................................... 22-37
Data Densification for Reporting..................................................................................................... 22-37
Partition Join Syntax ..................................................................................................................... 22-38
Sample of Sparse Data.................................................................................................................. 22-38
Filling Gaps in Data ...................................................................................................................... 22-39
Filling Gaps in Two Dimensions................................................................................................. 22-39
Filling Gaps in an Inventory Table............................................................................................. 22-41
Computing Data Values to Fill Gaps ......................................................................................... 22-42
Time Series Calculations on Densified Data................................................................................. 22-44
Period-to-Period Comparison for One Time Level: Example ................................................ 22-45
Period-to-Period Comparison for Multiple Time Levels: Example....................................... 22-46
Creating a Custom Member in a Dimension: Example........................................................... 22-50
Miscellaneous Analysis and Reporting Capabilities................................................................... 22-51
WIDTH_BUCKET Function......................................................................................................... 22-51
WIDTH_BUCKET Syntax..................................................................................................... 22-52
Linear Algebra............................................................................................................................... 22-54
CASE Expressions......................................................................................................................... 22-55
Creating Histograms ............................................................................................................. 22-56
Frequent Itemsets.......................................................................................................................... 22-57
23 SQL for Modeling
Overview of SQL Modeling................................................................................................................ 23-1
How Data is Processed in a SQL Model ...................................................................................... 23-3
Why Use SQL Modeling?............................................................................................................... 23-3
SQL Modeling Capabilities............................................................................................................ 23-4
Basic Topics in SQL Modeling ........................................................................................................... 23-7
Base Schema..................................................................................................................................... 23-7
MODEL Clause Syntax................................................................................................................... 23-8
Keywords in SQL Modeling........................................................................................................ 23-10
Assigning Values and Null Handling................................................................................. 23-10
Calculation Definition ........................................................................................................... 23-10
Cell Referencing ............................................................................................................................ 23-11
Symbolic Dimension References.......................................................................................... 23-11