ADA-C01 · Question #50
An Administrator needs to create a sample of the table LINEITEM. The sample should not be repeatable and the sampling function should take the data by blocks of rows. What select command will…
The correct answer is B. select * from LINEITEM sample system (20). This command will generate a sample of 20% of the table by using the SYSTEM (or BLOCK) sampling method, which selects each block of rows with a probability of 20/100. This method is suitable for taking data by blocks of rows, as the question requires. According to the Snowflake…
Question
An Administrator needs to create a sample of the table LINEITEM. The sample should not be repeatable and the sampling function should take the data by blocks of rows. What select command will generate a sample of 20% of the table?
Options
- Aselect * from LINEITEM sample bernoulli (20);
- Bselect * from LINEITEM sample system (20);
- Cselect * from LINEITEM tablesample block (20 rows);
- Dselect * from LINEITEM tablesample system (20) seed (1);
How the community answered
(23 responses)- A9% (2)
- B83% (19)
- C4% (1)
- D4% (1)
Explanation
This command will generate a sample of 20% of the table by using the SYSTEM (or BLOCK) sampling method, which selects each block of rows with a probability of 20/100. This method is suitable for taking data by blocks of rows, as the question requires. According to the Snowflake documentation, "SYSTEM (or BLOCK): Includes each block of rows with a probability of p/100. Similar to flipping a weighted coin for each block of rows. This method does not support fixed-size
Topics
Community Discussion
No community discussion yet for this question.