15.10 - Example: Collecting Statistics on Multiple Columns with an Expression - Teradata Database

Teradata Database SQL Data Definition Language Syntax and Examples

prodname
Teradata Database
vrm_release
15.10
created_date
December 2015
category
Programming Reference
featnum
B035-1144-151K

This example includes an expression and collects statistics on multiple columns.

     COLLECT STATISTICS USING SYSTEM SAMPLE
     COLUMN (EXTRACT(MONTH FROM o_orderdate), o_totalprice)
     AS stats_month_price
     ON orders;