Scalar Subqueries
A subquery is a query nested inside another query. A scalar subquery returns a single value (one row, one column).
You can use it in a WHERE clause to compare values against a calculated result.
-- Find students with scores higher than the class average
SELECT * FROM students
WHERE score > (SELECT AVG(score) FROM students);
Task:
Find all products that are more expensive than the average price of all products.