nPath Function Results Example | Teradata Vantage - nPath Results Example: Hindi Input, ACCUMULATE DISTINCT and CDISTINCT - Analytics Database

Database Analytic Functions

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2024-04-06
dita:mapPath
gjn1627595495337.ditamap
dita:ditavalPath
ayr1485454803741.ditaval
dita:id
jmh1512506877710
Product Category
Teradata Vantage™

Input

unicode_path
id price 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 Call

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;

Output

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