Recap - Engineer new columns
CoddyのSQLジャーニー「基礎」セクションの一部 — レッスン 30/72。
チャレンジ
簡単利用可能なテーブルと列:
<strong>items</strong>:<strong>id</strong>
4次関数が定義されています:
f(x) = ax<sup>4</sup>+bx<sup>3</sup>+cx<sup>2</sup>+dx+e
定数パラメータを定義します:
a = 3b = 5c = 0.9d = 2.2e = 1
id を取得し、x を id として 4次関数を計算し、列名を quartic にリネームしてください
POWER()のようなビルトイン関数を使用しないでください!
2乗や 3乗を計算するには、以下の例を使用してください:
a*a
-- power of 2
a*a*a
-- power of 3自分で試してみよう
基礎のすべてのレッスン
4More Keywords
The IN keywordThe BETWEEN keywordThe LIKE keywordThe AS keywordRecap - Cellphone Models2Conditions
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