I have a table looks like this:
I would like to assign "initial" to the oldest date, "recent" to the most recent date, and the others "interim" according to groupID (1,2).
Any suggestion on how to do it in teradata SQL will be appreciated, thanks!
when min(datecol) over (partition by groupid) then 'initial'
when max(datecol) over (partition by groupid) then 'recent'