I got the following code
select 'mach_dt', sum(downtime) FROM Uptimequery where deptgroup = 'machining' UNION ALL
select 'mach_wo', count(workorderno) FROM Uptimequery where deptgroup = 'machining' and workstatus in (1,2) UNION ALL
select 'mach_mttr', avg(mttr) FROM UptimeQuery where deptgroup = 'machining' UNION ALL
select 'pna_dt', sum(downtime) FROM Uptimequery where deptgroup = 'paints and assembly' UNION ALL
select 'pna_wo', count(workorderno) FROM UptimeQuery where deptgroup = 'paints and assembly' and workstatus in (1,2) UNION ALL
select 'pna_mttr', avg(mttr) FROM UptimeQuery where deptgroup = 'paints and assembly';

I need to display the above in a report. Furthermore I need to display mach_dt + pna_dt, can any one help me with this by making changes to the code or telling me the procedure involved

thank you