7.00.02 - Best-Match Mode Syntax (DOUBLE PRECISION Input) - Aster Analytics

Teradata Aster® Analytics Foundation User GuideUpdate 2

Product
Aster Analytics
Release Number
7.00.02
Release Date
September 2017
Content Type
Programming Reference
User Guide
Publication ID
B700-1022-700K
Language
English (United States)
Version 1.0
SELECT * FROM DistnmatchReduce (
  ON DistnmatchMultipleInput (
    ON (SELECT RANK() OVER (PARTITION BY column [,...]
      ORDER BY column) AS rank, *
      FROM input_table WHERE column IS NOT NULL)
      AS input PARTITION BY ANY
    ON (SELECT column[,...]
      COUNT(*) AS group_size,
      AVG (column) AS mean,
      STDDEV (column) AS sd,
      CASE
        WHEN MIN (column) > 0 THEN AVG (LN (
          CASE
            WHEN column > 0 THEN column 
            ELSE 1
          END)
        )
        ELSE 0
      END AS mean_of_ln,
      CASE
        WHEN MIN (column) > 0 THEN STDDEV (LN (
          CASE
            WHEN column > 0 THEN column 
            ELSE 1
          END)
        )
        ELSE -1
      END AS sd_of_ln,
      Max (column) AS maximum,
      MIN (column) AS minimum
      FROM input_table 
      WHERE column IS NOT NULL
      GROUP BY column[,...]
    ) AS groupstats DIMENSION
    ValueColumn (column)
    [ Tests ('test' [,...]) ]
    [ Distributions ('distribution1:parameter1',...) ]
    [ GroupByColumns
    ({ 'group_by_column' | 'group_by_column_range' }[,...]) ]
    MinGroupSize (minGroupSize)
    [ NumCell (cell_Size) ]
  ) PARTITION BY column[,...]
  [ Top ('top') ]
);