Expand To Other Products
Part of the Fundamentals section of Coddy's SQL journey. Lesson 54 of 72.
Challenge
EasyAvailable tables and columns:
<strong>enom_gilpane</strong>:<strong>part_id</strong>,<strong>rpm</strong>,<strong>watt</strong>,<strong>size</strong>
Keep only the parts (from the enom_gilpane table) that have a quality value greater than the average quality.
Return part_id and quality
Try it yourself
-- Name the query from the previous challenge so you can use it more than once
WITH enom_gilpane_quality AS (
____
)
SELECT *
FROM enom_gilpane_quality
-- Compare each row against the average taken over that same named block
WHERE ____All lessons in Fundamentals
4More Keywords
The IN keywordThe BETWEEN keywordThe LIKE keywordThe AS keywordRecap - Cellphone Models10Imaginary Products
Adjust WattCalculate Product Quality2Conditions
Conditions BasicsThe AND keywordThe OR keywordThe NOT keywordMultiple Conditions CombinedParenthesisBooleans5Arithmetic Operations
Mathematical OperatorsMathematical ColumnsThe Modulo OperationThe ROUND() Function3Specific Return Format
Null valuesSort Results Part 1Sort Results Part 2Recap - Cyber Security FirmLimit number of recordsRecap - Vehicle Factory6Intro Challenges
Recap - Parliamentary ElectionRecap - Police Criminal ArrestRecap - Bar Beverage ContainerRecap - Engineer new columnsPractice on your own: SQL playground