1.1 - 8.10 - Histogram Example: AutoBin ('Scott') - Teradata Vantage

Teradata Vantage™ - Machine Learning Engine Analytic Function Reference

Product
Teradata Vantage
Release Number
1.1
8.10
Release Date
October 2019
Content Type
Programming Reference
Publication ID
B700-4003-079K
Language
English (United States)

Input

SQL Call

DROP TABLE cars_scott_out;
SELECT * FROM Histogram(
  ON cars_hist AS InputTable
  OUT TABLE OutputTable(cars_scott_out)
  USING
  AutoBin('Scott')
  TargetColumn('hp')
) AS dt ORDER BY 1;

Output

 output_table                      output_columns                              
 --------------------------------- ------------------------------------------- 
 specified in OutputTable argument bin bin_start bin_end bin_count bin_percent
SELECT * FROM cars_scott_out ORDER BY 1;
 bin bin_start bin_end bin_count bin_percent 
 --- --------- ------- --------- ----------- 
   0       0.0   100.0         9       28.13
   1     100.0   200.0        16          50
   2     200.0   300.0         6       18.75
   3     300.0   400.0         1        3.13

Download a zip file of all examples and a SQL script file that creates their input tables from the attachment in the left sidebar.