TD_ ScaleTransform Function Example | Teradata Vantage - TD_ScaleTransform Example - Teradata® Database

Database Analytic Functions

Product
Teradata® Database
Release Number
17.10
Published
July 2021
Language
English (United States)
Last Update
2021-07-28
dita:mapPath
Teradata_Vantage™___Advanced_SQL_Engine_Analytic_Functions.withLogo_upload_July2021/wnd1589838592459.ditamap
dita:ditavalPath
Teradata_Vantage™___Advanced_SQL_Engine_Analytic_Functions.withLogo_upload_July2021/ayr1485454803741.ditaval
dita:id
B035-1206
lifecycle
previous
Product Category
Teradata Vantage™

SQL Call

SELECT * FROM TD_scaleTransform (
  ON scale_input_table AS InputTable
  ON scaleFitOut AS FitTable DIMENSION
  USING
  Accumulate ('passenger')
) AS dt ORDER BY 1;

Output

passenger fare        
 --------- ------------------ 
        97 0.363855214723926
       488 0.303067484662577
       505 1
       631 0.306748466257669
       873 0