Quantcast
Channel: Teradata Forums - Database
Viewing all articles
Browse latest Browse all 14773

Generating Sequence Number when GROUP BY in the Query - response (5) by teradata_chela2

$
0
0

Hi Sagar ,
Please find the query below . Hope it helps .
 
SEL
X.Account1 ,
ID1 ,
A.COL3
FROM TableA X
INNER JOIN
( SEL Account1 ,ROW_NUMBER() OVER ( ORDER BY Account1 ) COL3
FROM TableA
GROUP BY 1 ) A
ON
X.Account1 = A.Account1;


Viewing all articles
Browse latest Browse all 14773

Trending Articles