COLLECT DEMOGRAPHICS Examples | SQL Statements | Teradata Vantage - COLLECT DEMOGRAPHICS Examples - Analytics Database - Teradata Vantage

SQL Data Manipulation Language

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2024-04-05
dita:mapPath
pon1628111750298.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
esx1472246586715
lifecycle
latest
Product Category
Teradata Vantage™

Example: Collect Demographic Estimates

Collect demographic estimates on table_1 in database db_1 and write the results into the DataDemographics table of user-defined QCD MyQCD.

     COLLECT DEMOGRAPHICS FOR db_1.table_1 INTO MyQCD;

Example: Update Demographic Estimates

An entry already exists in the DataDemographics table for the specified table, then it is updated with the currently collected demographic estimates. The value of TimeStamp is updated to reflect the current time.

     COLLECT DEMOGRAPHICS FOR db_1.table_1 INTO MyQCD; /* Inserts data
     into DataDemographics table of MyQCD */
     COLLECT DEMOGRAPHICS FOR db_1.table_1 INTO MyQCD; /* Updates data
     in DataDemographics table of MyQCD */