
Answer-first summary for fast verification
Answer: SELECT MIN(ORDER_AMT) FROM SALES;
The question asks which operation can be performed without consuming compute resources, assuming no prior queries have been run. In Snowflake, MIN and MAX operations can leverage metadata stored in the cloud services layer, specifically the range of values (including min/max) maintained for each micro-partition. This metadata allows MIN/MAX to be determined without scanning data or using compute resources. Option C (SELECT MIN(ORDER_AMT) FROM SALES) fits this, as the min value can be retrieved from metadata. Option A (SUM) and B (AVG) require aggregating all values, necessitating compute. Option D involves a column multiplication that requires scanning and computing each row, also needing compute. The community discussion strongly supports C (96% consensus), with comments noting MIN/MAX execute from cloud services layer without compute, while others criticize incorrect answers. Thus, C is correct.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
Which of the following operations can be performed without consuming any compute resources, assuming no prior queries have been run?
A
SELECT SUM (ORDER_AMT) FROM SALES;
B
SELECT AVG(ORDER_QTY) FROM SALES;
C
SELECT MIN(ORDER_AMT) FROM SALES;
D
SELECT ORDER_AMT * ORDER_QTY FROM SALES;