A retail company wants to analyze sales data to determine the total revenue generated per product category. Which SQL operation would you use to achieve this?
- GROUP BY
- HAVING
- JOIN
- ORDER BY
To achieve the desired result, you would use the SQL operation GROUP BY. This allows you to group rows that have the same values in specified columns, enabling the calculation of aggregate functions like SUM to determine total revenue per product category.
Loading...
Related Quiz
- A large e-commerce website experiences slow query performance due to a massive volume of customer data. What relational schema design technique could you employ to optimize storage and enhance query performance?
- Which type of data does a dimension table primarily contain?
- Which type of NoSQL database is best suited for hierarchical data with dynamic schemas?
- Scenario: A social media platform aims to enhance user experience by recommending relevant content based on user interests. How could clustering algorithms be utilized to achieve this objective?
- How does data integrity play a role in relational schema design?