17.00 - Example: Using MultiExpStatsV - Teradata Database

Teradata Vantage™ - Data Dictionary

prodname
Advanced SQL Engine
Teradata Database
vrm_release
17.00
created_date
June 2020
category
Administration
Programming Reference
featnum
B035-1092-170K

This example assumes the following statistics have been collected:

 STATISTICS
    COLUMN (o_orderno, CAST(o_orderdatetime AS DATE)) AS Stats_OrderDate
    ON Orders;

This query can be used to retrieve statistics collected on multiple columns involving expressions:

SELECT * FROM dbc.MultiExpStatsV
     WHERE databasename = 'sales'
     AND tablename = ‘orders’;