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.