7.00.02 - Histogram (Hist) Syntax - Aster Analytics

Teradata Aster® Analytics Foundation User GuideUpdate 2

Product
Aster Analytics
Release Number
7.00.02
Published
September 2017
Content Type
Programming Reference
User Guide
Publication ID
B700-1022-700K
Language
English (United States)
Last Update
2018-04-17
Version 1.0

The bin definition options are:

  • The function can determine the bin boundaries automatically, using one of two built-in algorithms.
  • You can specify the bin boundaries.
  • You can provide the minimum and maximum values for the histogram, and an optional bin size. If you specify a bin size is, all bins have that size; if not, bins might not be the same size.
    SELECT * FROM hist (
      ON (SELECT 1) PARTITION BY 1
      InputTable (input_table)
      OutputTable (output_table)
      { AutoBin ({ 'Sturges' | 'Scott' | number_of_bins }) |
    
        CustomBinTable (bin_table)
        CustomBinColumn ('breaks_col') |
    
        StartValue ('bin_start')
        BinSize ('bin_size')
        EndValue ('bin_end')
      }
      ValueColumn ('value_column')
      [ Inclusion ({ 'left' | 'right' }) ]
      [ GroupbyColumns('group_by_column') ]
    );