select
t3.user_id,
t4.city_id,
(t3.oper_zayavki / t4.`Заявки`) * t4.`Расход`
from Goroda_Statistika t4
inner join
(
select
t1.user_id,
t2.city_id,
sum(t2.`Заявки`) as oper_zayavki
from Operatory t1
join Operatory_Statistika t2 on t2.user_id = t1.user_id
group by t1.user_id, t2.city_id
) t3 on t3.city_id = t4.city_id