⚡️ Pass with Confidence Sale - 40% off ALL packages! ⚡️

2 days, 2 hours remaining!

CompTIA Data+ DA0-002 (V2) Practice Question

While building a performance dashboard, a data analyst needs to identify product categories whose combined unit sales meet or exceed 1,000 units so that only high-volume categories appear in a chart. The transactional table sales.detail stores one row per product sold and includes the columns product_id, category_id, and units_sold.

Which SQL statement will return only the qualifying categories and their total units sold without generating a syntax error?

  • SELECT category_id,
           SUM(units_sold) AS total_units
    FROM   sales.detail
    WHERE  units_sold >= 1000
    GROUP BY category_id;
    
  • SELECT category_id,
           SUM(units_sold) AS total_units
    FROM   sales.detail
    GROUP BY category_id
    HAVING SUM(units_sold) >= 1000;
    
  • SELECT category_id,
           SUM(units_sold) AS total_units
    FROM   sales.detail
    WHERE  SUM(units_sold) >= 1000
    GROUP BY category_id;
    
  • SELECT category_id,
           SUM(units_sold) AS total_units
    FROM   sales.detail
    GROUP BY category_id
    HAVING COUNT(units_sold) >= 1000;
    
CompTIA Data+ DA0-002 (V2)
Data Acquisition and Preparation
Your Score:
Settings & Objectives
Random Mixed
Questions are selected randomly from all chosen topics, with a preference for those you haven’t seen before. You may see several questions from the same objective or domain in a row.
Rotate by Objective
Questions cycle through each objective or domain in turn, helping you avoid long streaks of questions from the same area. You may see some repeat questions, but the distribution will be more balanced across topics.

Check or uncheck an objective to set which questions you will receive.

Bash, the Crucial Exams Chat Bot
AI Bot