Nutrition Co., a health snack company, would like to know the total impressions that have been delivered per campaign, per supply_source, per device_type. Which of the following represents how to write this query?
Choose an answer
Tap an option to check your answer.
Correct answer: SELECT campaign, supply_source, device_type, SUM(impressions) AS impressions FROM dsp_impressions GROUP BY.
Why this is the answer
The correct query SELECT campaign, supplysource, devicetype, SUM(impressions) AS impressions FROM dspimpressions GROUP BY accurately aggregates impressions by the specified dimensions. The SELECT statement includes campaign, supplysource, and devicetype to show these attributes, and SUM(impressions) AS impressions calculates the total impressions. The FROM dspimpressions clause specifies the table containing the impression data. The GROUP BY clause, although incomplete in the prompt, would typically list campaign, supplysource, devicetype to ensure the sum is calculated for each unique combination of these fields. The other options are incorrect because they either misplace the SUM function, use incorrect table names, or have an incomplete GROUP BY clause that would lead to incorrect aggregation.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed