Hie i had the same issue on Monday but i used a view to kill it see if it might help
1) Create a View (my_table1 - 5 ) which pulls all the data you want in the World. Yote Yote
2) Use Below to Sum and Arrange from the View
select `viewalltables`.`Products` AS `Products`,
sum((case when (`viewalltables`.`priority` = 'Immediate') then 1 else 0 end)) AS `A`,
sum((case when (`viewalltables`.`priority` = 'Urgent') then 1 else 0 end)) AS `B`,
sum((case when (`viewalltables`.`priority` = 'High') then 1 else 0 end)) AS `C`,
sum((case when (`viewalltables`.`priority` = 'Normal') then 1 else 0 end)) AS `D`,
sum((case when (`viewalltables`.`priority` = 'Low') then 1 else 0 end)) AS `E`,
sum((case when (`viewalltables`.`name` = 'New') then 1 else 1 end)) AS `F`,
sum((case when (`viewalltables`.`name` = 'Closed') then 1 else 0 end)) AS `G`,
sum((case when (`viewalltables`.`name` = 'Resolved') then 1 else 0 end)) AS `H`
from `viewalltables`
group by `viewalltables`.`Products`;
3) i think it can cook well