nPath Resultの例: ヒンディー語入力ACCUMULATE DISTINCTおよびCDISTINCT - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - Advanced SQL Engine分析関数

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Published
2021年7月
Language
日本語
Last Update
2021-09-23
dita:mapPath
ja-JP/wnd1589838592459.ditamap
dita:ditavalPath
ja-JP/ayr1485454803741.ditaval
dita:id
B035-1206
Product Category
Software
Teradata Vantage

入力

unicode_path
id 価格 Event
2 2.20000000000000E 000 ఈవట1
2 5.13300000000000E 001 ఈవట2
2 9.88123000000000E 002 ఈవట3
2 -1.20000000000000E-001 ఈవట4
2 1.10000000000000E 000 ఈవట5
2 1.12000000000000E 001 ఈవట5
2 1.22000000000000E 001 ఈవట5
2 1.20000000000000E 000 ఈవట1

SQL呼び出し

SELECT * FROM nPath (
  ON unicode_path PARTITION BY id
  USING
  Mode (NONOVERLAPPING)
  Pattern ('A*')
  Symbols (true AS A)
  Result (
    ACCUMULATE (DISTINCT event OF A DELIMITER ',  ' ) AS acc_result_distinct,
    ACCUMULATE (CDISTINCT event OF A DELIMITER ',  ' ) AS acc_result_cdistinct
  )
) AS dt;

出力

acc_result_distinct acc_result_cdistinct
[ఈవట3, ఈవట5, ఈవట1, ఈవట4, ఈవట2] [ఈవట3, ఈవట5, ఈవట1, ఈవట4, ఈవట2, ఈవట1]