SQL-MapReduce Call - 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

The statistics are created from a query on the input table finance_data3 and grouped by column id.

SELECT * FROM SAX2 (
  ON finance_data3 AS INPUT
  PARTITION BY id
  ORDER BY id 
  ON (SELECT id, AVG (expenditure) AS expenditure,
  AVG (income) AS income,
  AVG (investment) AS investment
  FROM finance_data3 GROUP BY id) AS meanstats PARTITION BY id
  ON (SELECT id, STDDEV (expenditure) AS expenditure,
  STDDEV (income) AS income,
  STDDEV (investment) AS investment
  FROM finance_data3 GROUP BY id) AS stdevstats PARTITION BY id
  ValueColumns ('expenditure', 'income', 'investment')
  TimeColumn ('period')
  WindowType ('global')
  PrintCodeStats ('true')
  Accumulate ('id')
) ORDER BY id;