Adjust Watt
Part of the Fundamentals section of Coddy's SQL journey — lesson 52 of 72.
Challenge
EasyAvailable tables and columns:
<strong>enom_gilpane</strong>:<strong>part_id</strong>,<strong>rpm</strong>,<strong>watt</strong>,<strong>size</strong>
In this project you are a visitor in an imaginary product factory. You want to find the best quality products to buy for your industry.
Each table represents a product and each product has many parts. All tables (which will be added in later challenges) have the same columns.
For this challenge we will focus only on one product (table)
Your task is to adjust the watt values: For each row, add the overall average watt value (calculated from the entire table) to the existing watt value of that specific part.
In other words, calculate the average watt across all parts in the table, then add this same average to each individual part's watt value.
Return part_id, rpm, adjusted_watt and size
Try it yourself
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 columns