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 clickstream PARTITION BY userid ORDER BY clicktime
  Symbols (pagetype='home' AS home,
    pagetype!='home' AND pagetype!='checkout' AS view,
    pagetype='checkout' AS checkout)
  Pattern ('home.view*.checkout')
  Result (FIRST(userid of ANY(home, checkout, view)) AS userid,
    FIRST (sessionid of ANY(home, checkout, view)) AS sessionid,
    COUNT (* of any(home, checkout, view)) AS cnt,
    FIRST (clicktime of ANY(home)) AS firsthome,
    LAST (clicktime of ANY(checkout)) AS lastcheckout)
  Filter (FIRST (clicktime + '10 minutes' ::interval OF ANY (home)) > 
    FIRST (clicktime of any(checkout))) 
  Mode (NONOVERLAPPING)
);