New janitorial services contract proposal
Question
You're given the following tables showing information around a company’s real estate portfolio. The tables provide information on building size and total cost.
Table: building_info;
building_id | sqft | num_rooms | num_bathrooms |
---|---|---|---|
1 | 46265 | 46 | 12 |
2 | 98003 | 98 | 25 |
3 | 12092 | 12 | 3 |
4 | 61173 | 61 | 15 |
5 | 534 | 1 | 0 |
6 | 47531 | 48 | 12 |
7 | 62581 | 63 | 16 |
8 | 49242 | 49 | 12 |
9 | 89990 | 90 | 23 |
10 | 75499 | 75 | 19 |
11 | 12904 | 13 | 3 |
12 | 85078 | 85 | 21 |
13 | 88441 | 88 | 22 |
14 | 98556 | 99 | 25 |
15 | 51721 | 52 | 13 |
16 | 90338 | 90 | 23 |
17 | 67783 | 68 | 17 |
18 | 76245 | 76 | 19 |
19 | 15601 | 16 | 4 |
20 | 41703 | 42 | 11 |
21 | 80154 | 80 | 20 |
22 | 65819 | 66 | 17 |
Table: building_cost
building_id | rent | janitorial |
---|---|---|
1 | 184314 | 2654 |
2 | 65486 | 1372 |
3 | 52891 | 2145 |
4 | 113357 | 1688 |
5 | 2362 | 32 |
6 | 327317 | 28770 |
7 | 108578 | 2701 |
8 | 181283 | 2086 |
9 | 786845 | 10904 |
10 | 589682 | 6259 |
11 | 11765 | 441 |
12 | 752330 | 13453 |
13 | 201431 | 42431 |
14 | 387695 | 6465 |
15 | 145237 | 1836 |
16 | 708348 | 10147 |
17 | 277285 | 3170 |
18 | 76699 | 816 |
19 | 84056 | 999 |
20 | 52677 | 981 |
21 | 723244 | 8425 |
22 | 72481 | 5836 |
Suppose your company is offered a new janitorial deal with an outside firm, who is offering cleaning services at a flat rate of $50 per bathroom and $25 per room (paid monthly). Is this a deal your company should consider taking?
Our solution will be written in SQL for premium users. You can view/query this table in an interactive SQL fiddle here.