There is a need to calculate the sum of all lines. Request with union, at the moment I consider the totals for each select. The question is how to calculate the totals and output only one this line?
SELECT order_delivery_data.order_delivery_data_name, sum(round(case `order`.order_status when 'paid' then `order`.order_totalSumm else 0 end)) paid, sum(round(case `order`.order_status when 'later' then `order`.order_totalSumm else 0 end)) later FROM order_delivery_data INNER JOIN `order` ON order_delivery_data.order_id = `order`.order_id WHERE order_delivery_data.order_delivery_data_name in ('BetaPost','Pony Express Россия','Доставка Почтой России', 'КСЭ','Москва BetaPro','СДЭК','СПСР') GROUP BY order_delivery_data.order_delivery_data_name WITH ROLLUP UNION select IFNULL(`delivery-types`.`delivery-types_name`,'Total'), sum(round(case `order`.order_status when 'paid' then `order`.order_totalSumm else 0 end)) paid, sum(round(case `order`.order_status when 'later' then `order`.order_totalSumm else 0 end)) later FROM `delivery-types` INNER JOIN order_delivery ON `delivery-types`.`delivery-types_code` = order_delivery.order_delivery_code INNER JOIN `order` ON order_delivery.order_id = `order`.order_id WHERE order_delivery.order_delivery_code = 'courier' GROUP BY `delivery-types`.`delivery-types_name` WITH ROLLUP
select нужные-суммы from (ваш-текущий-запрос-без-rollup) X- Mikeselect sum(paid), sum(later) from (ваш-запрос) X- Mike