Found a similar question but without an answer that worked succuessfully.
I need to select a sample of 50 of each status type within a single table.
TABLE1
MEMBER STATUS
1234 A
1324 A
3424 R
3432 S
3232 R
2783 A
2413 S
4144 R
2387 S
I tried:
SEL Member, status FROM TABLE1 Qualify Row_Number ( ) OVER (PARTITION BY status ORDER BY random (1,10000)) <=50
As suggested in the previous question/answer but Teradata does not like RANDOM in an Aggregate or Ordered Analytical Function.