Can Teradata SQL Query do Auto-Increment?
I’m looking for something similar to
SELECT
Date (Auto-Increment by 1 over Column 2),
Column 2,
Column 3
FROM Fake_Table
GROUP BY 1,2,3
And get something such as
Date Column 2 Column 3
2012-06-11 A A
2012-06-11 A B
2012-06-11 A C
2012-06-12 B A
2012-06-13 C B
Is this possible?
You should be able to use the ROW_NUMBER() window aggregate with a PARTITION BY and ORDER BY statement to provide you a seed value to add to the DATE.
Pseudo-Code: