Understanding Teradata’s SAMPLE Function: Randomly Select Rows and More
What is the Teradata Sample Function? The SAMPLE function returns a set of randomly selected rows. Here are the characteristics: The Syntax of the Sample Function SAMPLE [WITH REPLACEMENT] [RANDOMIZED ALLOCATION][WHEN <condition> THEN] {<number of row> | <percentage>} […,<number-of-rows> | <percentage>][ELSE {<number of rows> | <percentage } END] Here are some examples of how to …