Teradata SAMPLE Clause

Teradata SAMPLE Clause

Teradata provides SAMPLE clause to return specific number/percentage of random rows containing required samples of data from the query resultset. There are many option available to use along with SAMPLE clause but this tutorial will cover only 2 simple variations. Table along with data used in the below examples can be found here.


SAMPLE n
SAMPLE WHEN