Calculate Product Quality
Teil des Abschnitts Grundlagen der SQL-Journey von Coddy. Lektion 53 von 72.
Aufgabe
EinfachVerfügbare Tabellen und Spalten:
<strong>enom_gilpane</strong>:<strong>part_id</strong>,<strong>rpm</strong>,<strong>watt</strong>,<strong>size</strong>
Berechnen Sie die Qualität für jedes Teil mit dieser Formel: Qualität = (rpm * adjusted_watt) / size.
Beachten Sie, dass wir adjusted_watt verwenden.
Geben Sie part_id und quality zurück.
Probier es selbst
-- Die äußere Abfrage liest aus einer Quelltabelle, die Sie unten erstellen
SELECT part_id, ____ AS quality
____Alle Lektionen in Grundlagen
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Übe selbstständig: SQL-Playground