Според схемата на вашата база данни, ако просто искате очаквания резултат, моля, опитайте да следвате sql;)
select
case source_id when 1 then 'online' when 2 then 'visit' when 3 then 'phone' end as `Type`,
sum(if(month(date_created) = 5, total_price, 0)) as `May`,
sum(if(month(date_created) = 6, total_price, 0)) as `June`
from `orders`
where date_created between (curdate() - interval 1 month) and curdate()
group by source_id