7.00.02 - SQL-MapReduce Call - 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)
SELECT * FROM DistnmatchReduce (
  ON DistnmatchMultipleInput (
    ON (SELECT RANK() OVER (PARTITION BY factory, product
        ORDER BY mttf) AS rank, * FROM factory7
        WHERE mttf IS NOT NULL) AS input PARTITION BY ANY
    ON (SELECT factory, product, COUNT(*) AS group_size,
        AVG(mttf) AS mean, STDDEV(mttf) AS sd,
        CASE
          WHEN MIN(mttf) > 0
            THEN AVG(LN(CASE WHEN mttf > 0 THEN mttf ELSE 1 END))
          ELSE 0
        END AS mean_of_ln,
        CASE
          WHEN MIN(mttf) > 0
            THEN STDDEV(LN(CASE WHEN mttf > 0 THEN mttf ELSE 1 END))
          ELSE -1
        END AS sd_of_ln,
        MAX(mttf) AS maximum,
        MIN(mttf) AS minimum
        FROM factory7
        WHERE mttf IS NOT NULL
        GROUP BY factory, product) AS groupstats DIMENSION
    ValueColumn ('mttf')
    Tests ('KS', 'AD', 'CHISQ')
    GroupingColumns ('factory', 'product')
    MinGroupSize ('50')
    NumCell ('10')
  ) PARTITION BY factory, product
);