SnowPro Core Certification — Question 806
Which query will return a sample of a table with 1000 rows named testtable, in which each row has a 10% probability of being included in the sample?
Answer options
- A. select * from testtable sample (0.1);
- B. select * from testtable sample (10);
- C. select * from testtable sample (0.1 rows);
- D. select * from testtable sample (10 rows);
Correct answer: B
Explanation
The correct answer, B, uses the sample size of 10, which corresponds to 10% of 100 rows in a 1000-row table. Option A incorrectly specifies a percentage without an integer sample size, while C incorrectly uses 'rows' in the syntax, and D specifies a fixed number of rows instead of a percentage.