Skip to content
DEA
Data Processing & Transformations
medium
Question 3 of 62

A data engineer writes the following Spark SQL to query a Delta table:\n\n
\nSELECT customer_id, SUM(amount) AS total\nFROM orders\nWHERE status = 'complete'\nGROUP BY customer_id\nHAVING SUM(amount) > 1000\nORDER BY total DESC\n
\n\nWhat does the HAVING clause do in this query?

AFilters rows from the orders table before aggregation
BFilters out customers whose total aggregated amount is 1000 or less, after the GROUP BY aggregation
CSorts the aggregated results in descending order
DRestricts the query to only rows where amount > 1000

Educational Content — CertQnA practice questions are written against official exam objectives, covering the same domains tested on the real exam. All content is original and independent — not actual exam questions, not affiliated with any certification vendor. Learn more about our content policy

Discussion

Be the first to share your understanding of this concept

⚠️ Discussion is for concept clarification only. Do not share or request actual exam questions or answers.

Sign in to join the discussion