1.1 - 8.10 - Histogram Syntax - 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)

Version 1.5

SELECT * FROM Histogram (
  ON { table | view | (query) } AS InputTable
  [ ON { table | view | (query) } AS CustomBinTable ]
  OUT TABLE OutputTable (output_table)
  USING
  { AutoBin ({ 'Sturges' | 'Scott' | number_of_bins }) |
    CustomBinColumn ('breaks_col') |
    StartValue (bin_start)
    BinSize (bin_size)
    EndValue (bin_end)
  }
  TargetColumn ('target_column')
  [ Inclusion ({ 'left' | 'right' }) ]
  [ GroupbyColumns ({ 'group_column' | group_column_range }[,...]) ]
) AS alias;

Bin Definition Options

  • The function determines the bin boundaries automatically, using one of two algorithms.
  • You specify the bin boundaries.
  • You provide the minimum and maximum values for the histogram and an optional bin size. If you specify a bin size, all bins have that size; if not, bins might not be the same size.