Im stuck on another section
Im trying to find the consultant_name and skill_id for all consultants with more than 7 hours for any given project.
this is what i thought it was(clearly you can see i am really mized up here)
SELECT consultant_name, skill_id
FROM consultants
WHERE HOURS IN
(SELECT HOURS
FROM time
GROUP BY CONSULTANT
WHERE SUM(HOURS) > '7');
Please give me some advice
Thanks,
Derrick
Consultants:
+------------+-----------------+----------+--------+
| CONSULTANT | CONSULTANT_NAME | SKILL_ID | REGION |
+------------+-----------------+----------+--------+
| RAY | Smith |
PR | W |
| SUE | Jones | AN | NE |
| TED | Doe | DD | NE |
| URI | Roe | CP | S |
+------------+-----------------+----------+--------+
Time:
+------------+------------+--------+-------+
| PROJECT_ID | CONSULTANT | DATE | HOURS |
+------------+------------+--------+-------+
| P01 | SUE | 910626 | 5.0 |
| P01 | SUE | 910628 | 3.0 |
| P03 | TED | 910713 | 6.0 |
| P01 | URI | 910630 | 4.0 |
| P03 | TED | 910715 | 7.0 |
| P05 | TED | 910622 | 1.0 |
| P03 | RAY | 910715 | 4.0 |
| P05 | TED | 910624 | 3.0 |
+------------+------------+--------+-------+