Question 1 of 30
A retail company wants to generate a sales report that summarizes total sales for each product category over the last quarter. The report should display the categories in descending order based on total sales. Which SQL query would correctly achieve this?
SELECT category, SUM(sales) AS total_sales FROM sales_data WHERE sale_date >= ADD_MONTHS(SYSDATE, -3) GROUP BY category ORDER BY total_sales DESC;
SELECT category, COUNT(sales) AS total_sales FROM sales_data WHERE sale_date BETWEEN SYSDATE - 90 AND SYSDATE GROUP BY category ORDER BY category ASC;
SELECT category, AVG(sales) AS total_sales FROM sales_data WHERE sale_date > SYSDATE - 90 GROUP BY category ORDER BY total_sales ASC;
SELECT category, SUM(sales) AS total_sales FROM sales_data GROUP BY category HAVING sale_date >= SYSDATE - 90 ORDER BY total_sales ASC;

Preparing for Oracle Database 23ai SQL Associate? Now land the interview.

73% of qualified candidates get rejected because of weak resumes. Build an ATS-optimized, recruiter-ready resume in under 5 minutes - free to start.

Build My Resume Free