Chapter Practice Arena
All ChaptersScalar and Aggregate Functions Problems
Targeted practice challenges specifically curated for this chapter. Inspect hints, verify outputs, and check verified solutions.
Filter by Language:9 Problems
Filter by SQL Chapter:
Difficulty:
Chapter:
Showing 6 challenges · 9 total · Page 1 of 2
18. Practical Example: Search for a Substring
Starter Code
-- Practice query for String Functions
Expected Output
Returns products whose product_name contains the case-sensitive substring 'pro'. The actual rows depend on the stored data.
13. Calculating a Future Deadline
Starter Code
-- Practice query for Date and Time Functions
Expected Output
Formatted ResultIllustrative output:
| task_id | created_at | deadline |
|---|---|---|
| 1 | 2026-10-18 10:00:00+05:30 | 2026-10-25 10:00:00+05:30 |
1 row returned3 columns
15. Real-World Example: Product Pricing
Starter Code
-- Practice query for Numeric Functions
Expected Output
Formatted ResultIllustrative output:
| product_id | price | discount_percent | discount_amount | final_price |
|---|---|---|---|---|
| 1 | 100.00 | 10 | 10.00 | 90.00 |
| 2 | 249.99 | 15 | 37.50 | 212.49 |
2 rows returned5 columns
16. Finding Recent Records with NOW()
Starter Code
-- Practice query for Date and Time Functions
Expected Output
Formatted ResultIllustrative output:
| order_id | created_at |
|---|---|
| 203 | 2026-10-18 09:30:00+05:30 |
| 201 | 2026-10-15 14:20:00+05:30 |
2 rows returned2 columns
18. Grouping Data by Month
Starter Code
-- Practice query for Date and Time Functions
Expected Output
Formatted ResultIllustrative output:
| month_start | order_count |
|---|---|
| 2026-08-01 00:00:00+05:30 | 120 |
| 2026-09-01 00:00:00+05:30 | 145 |
| 2026-10-01 00:00:00+05:30 | 98 |
3 rows returned2 columns
17. Practical Example: Normalize Email Text
Starter Code
-- Practice query for String Functions
Expected Output
Returns customers with non-NULL email values, showing the original value and a lowercase version with surrounding spaces removed.