Search the courses, subjects, tracks, games and features, or jump straight to a page.
3 cards from this section. Quick, good the night before a test.
Write an SQL query to count the number of products sold in each category.
Remember to use GROUP BY after the SELECT statement.
How would you find the total number of orders made by each customer?
You'll need to aggregate by customer ID.
What clause do you use to group results based on a specific column?
Think about how you would summarize data.
True or False: The HAVING clause can be used without GROUP BY.
Remember what HAVING is designed for.
Draft a SQL query that identifies the three products with the highest sales, excluding any product that sold less than 50 units.
Use GROUP BY and HAVING effectively to filter.
Create a comprehensive report using SQL that highlights customer segments based on their number of purchases, categorizing them as 'Low', 'Medium', or 'High' based on thresholds you define.
You’ll need to use a CASE statement along with GROUP BY and HAVING.
5 more questions in this section. Enroll free to practise them all.
Enroll free