SnowPro Advanced: Data Engineer — Question 2
Given the table SALES which has a clustering key of column CLOSED_DATE, which table function will return the average clustering depth for the SALES_REPRESENTATIVE column for the North American region?
Answer options
- A. select system$clustering_information('Sales', 'sales_representative', 'region = ''North America''');
- B. select system$clustering_depth('Sales', 'sales_representative', 'region = ''North America''');
- C. select system$clustering_depth('Sales', 'sales_representative') where region = 'North America';
- D. select system$clustering_information('Sales', 'sales_representative') where region = 'North America’;
Correct answer: B
Explanation
The correct answer is B because the function system$clustering_depth is specifically designed to return the average clustering depth for a specified column while taking filtering conditions into account. Options A and D utilize system$clustering_information, which does not measure depth, and option C lacks the proper function to return the average clustering depth as it uses a WHERE clause instead of being part of the function's parameters.