, пожалуйста, помогите мне присоединиться к этим двум кандидатам:
SELECT IFNULL(sum(estimated_hours * t2.man_hour),0) as
estimated from project_has_tasks t1 left join users t2
on t1.user_id = t2.id group by project_id
SELECT IFNULL(sum(TIME_FORMAT(SEC_TO_TIME
(time_spent),'%k.%i' )* t2.man_hour),0) as time_spent_cost FROM project_has_tasks t1
left join users t2 on t1.user_id = t2.id group
by project_id
Хотите получить:
| estimated | time_spent_cost |
_______________________________
| 000000000 | 00000000 |