Skip to content
Chapter Practice Arena

Scalar and Aggregate Functions Problems

Targeted practice challenges specifically curated for this chapter. Inspect hints, verify outputs, and check verified solutions.

All Chapters
Filter by Language:9 Problems
Filter by SQL Chapter:
Difficulty:
Chapter:
Showing 6 challenges · 9 total · Page 1 of 2
#1beginnerString Functions
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 Result

Illustrative output:

task_idcreated_atdeadline
12026-10-18 10:00:00+05:302026-10-25 10:00:00+05:30
1 row returned3 columns
#3beginnerNumeric Functions
15. Real-World Example: Product Pricing
Starter Code
-- Practice query for Numeric Functions
Expected Output
Formatted Result

Illustrative output:

product_idpricediscount_percentdiscount_amountfinal_price
1100.001010.0090.00
2249.991537.50212.49
2 rows returned5 columns
16. Finding Recent Records with NOW()
Starter Code
-- Practice query for Date and Time Functions
Expected Output
Formatted Result

Illustrative output:

order_idcreated_at
2032026-10-18 09:30:00+05:30
2012026-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 Result

Illustrative output:

month_startorder_count
2026-08-01 00:00:00+05:30120
2026-09-01 00:00:00+05:30145
2026-10-01 00:00:00+05:3098
3 rows returned2 columns
#6beginnerString Functions
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.