17.10 - Example: Using MultiExpStatsV - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - Data Dictionary

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Administration
Programming Reference
Publication ID
B035-1092-171K
Language
English (United States)

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’;