Histogram (Hist) Syntax - Aster Analytics

Teradata Aster Analytics Foundation User Guide

Product
Aster Analytics
Release Number
6.21
Published
November 2016
Language
English (United States)
Last Update
2018-04-14
dita:mapPath
kiu1466024880662.ditamap
dita:ditavalPath
AA-notempfilter_pdf_output.ditaval
dita:id
B700-1021
lifecycle
previous
Product Category
Software
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') ]
    );