以下に説明する3つのテーブルがあります
MonthlyOrder テーブル 4 列 CustomerID DateID (整数で表され、月の初日 = 20121201) OrderCount - INT
HoursSpend Tbale には 4 つの列があります CustomerID DateID Function - VARCHAR() -- 関数は、Reporting、Admini、および Sales の呼び出しです Hours - INTEGER -- その月に各関数に費やされた時間
Rates テーブルには 3 つの列があります CustomerID AccountRate -- Money (IF NULL の場合、デフォルトは $50) OperationRates - Money
このテーブルから達成する必要がある計算は、(LoadCount*AccountRate) + ((HoursSpend テーブルからのレポート関数の時間 + Amin の時間 + セールス コールの時間) * Ratesテーブルからの OperationRates)です。
この計算
を
達成
する
ため
の最良
の
方法を教え
て
ください
。$18 $50
計算- > (OrderCount*AccountRate) + ((Reporting Hours + Admin Hours + Sales Calls Hours) * OperationRates)
20121201 の customerID 1 の例-> (20*18) + ((2+3+5) * 50) = $860
** トレーニングの時間は含まれていないことに注意