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 nPath (
  ON aggregate_clicks
  PARTITION BY sessionid
  ORDER BY clicktime ASC
  MODE (NONOVERLAPPING)
  PATTERN ('H+.D*.X*.P1.P2+')
  SYMBOLS (
    'true' AS X,
    pagetype = 'home' AS H,
    pagetype <> 'home' AND pagetype <> 'checkout' AS D,
    pagetype = 'checkout' AS P1,
    pagetype = 'checkout' AND
    productprice > 100 AND
    productprice > LAG (productprice, 1, 100::REAL) AS P2
  )
  RESULT (
    FIRST (productname OF P1) AS first_product,
    MAX_CHOOSE (productprice, productname OF P2) AS max_product,
    FIRST (sessionid OF P2) AS sessionid
  )
) ORDER BY sessionid;