17.10 - 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
Release Date
2021年7月
Content Type
プログラミング リファレンス
Publication ID
B035-1206-171K-JPN
Language
日本語 (日本)

入力

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]