June 2010
Intermediate to advanced
328 pages
7h 51m
English
10.0 times 0.1 is hardly ever 1.0.
Your boss asks you to produce a report of the cost of programmer time for the project, based on the total work to fix each bug. Each programmer in the Accounts table has a different hourly rate, so you record the number of hours required to fix each bug in the Bugs table, and you multiply it by the hourly_rate of the programmer assigned to do the work.
| Rounding-Errors/intro/cost-per-bug.sql | |
| | SELECT b.bug_id, b.hours * a.hourly_rate AS cost_per_bug |
| | FROM Bugs AS b |
| | JOIN Accounts AS a ON (b.assigned_to = a.account_id); |
To support this query, you need to create new columns in the Bugs and Accounts tables. Both columns should support fractional values, ...
Read now
Unlock full access