Chapter 18mChallenge

SQL Introduction — Challenge

Query language for databases.

This content is not yet available in or. Showing English version.

View in English →

Apply what you've learned. Each challenge includes starter code and test cases.

Products per Category

medium

Products per Category

Write a query that shows each product category and the number of products in it (COUNT(*)), aliased as n.

Expected Result

categoryn
Accessories2
Electronics4
Stationery2
STARTER CODE
-- Group products by category and count
1 test cases
Start Challenge

Adults in India

easy

Adults in India

Write a SQL query that returns the name and age of all users where age >= 18 AND country = 'India', ordered by age descending.

Expected Result

nameage
Rahul Verma25
Aarav Sharma22
Priya Patel19
STARTER CODE
-- Write your SQL query below
1 test cases
Start Challenge