select t1.* from( select workcell_name, equip_name, equipment_id, operation_desc, shifts_team, qty_flag, qty_time1 as "实际产出" ,case when shifts_team = '白班' then '09:30' else '21:30' end as "时间点" ,9 as num from ads.calb_output_report_equip_one_hour_v where base_flag = 'XM' and area_type NOT IN ('模组','模组段','PACK') and qty_flag = '每小时' and factory_stage = 'XMA1' and prod_line_code like 'C1%' and operation_desc = '切叠' and partion_by = '2022-07-20' and shifts_team = '白班' order by equipment_id union all select workcell_name, equip_name, equipment_id, operation_desc, shifts_team, qty_flag, qty_time2 as "产量" ,case when shifts_team = '白班' then '10:30' else '22:30' end as "时间点" ,10 as num from ads.calb_output_report_equip_one_hour_v where base_flag = 'XM' and area_type NOT IN ('模组','模组段','PACK') and qty_flag = '每小时' and factory_stage = 'XMA1' and prod_line_code like 'C1%' and operation_desc = '切叠' and partion_by = '2022-07-20' and shifts_team = '白班' order by equipment_id union all select workcell_name, equip_name, equipment_id, operation_desc, shifts_team, qty_flag, qty_time3 as "产量" ,case when shifts_team = '白班' then '11:30' else '23:30' end as "时间点" ,11 as num from ads.calb_output_report_equip_one_hour_v where base_flag = 'XM' and area_type NOT IN ('模组','模组段','PACK') and qty_flag = '每小时' and factory_stage = 'XMA1' and prod_line_code like 'C1%' and operation_desc = '切叠' and partion_by = '2022-07-20' and shifts_team = '白班' order by equipment_id union all select workcell_name, equip_name, equipment_id, operation_desc, shifts_team, qty_flag, qty_time4 as "产量" ,case when shifts_team = '白班' then '12:30' else '00:30' end as "时间点" ,12 as num from ads.calb_output_report_equip_one_hour_v where base_flag = 'XM' and area_type NOT IN ('模组','模组段','PACK') and qty_flag = '每小时' and factory_stage = 'XMA1' and prod_line_code like 'C1%' and operation_desc = '切叠' and partion_by = '2022-07-20' and shifts_team = '白班' order by equipment_id union all select workcell_name, equip_name, equipment_id, operation_desc, shifts_team, qty_flag, qty_time5 as "产量" ,case when shifts_team = '白班' then '13:30' else '01:30' end as "时间点" ,13 as num from ads.calb_output_report_equip_one_hour_v where base_flag = 'XM' and area_type NOT IN ('模组','模组段','PACK') and qty_flag = '每小时' and factory_stage = 'XMA1' and prod_line_code like 'C1%' and operation_desc = '切叠' and partion_by = '2022-07-20' and shifts_team = '白班' order by equipment_id union all select workcell_name, equip_name, equipment_id, operation_desc, shifts_team, qty_flag, qty_time6 as "产量" ,case when shifts_team = '白班' then '14:30' else '02:30' end as "时间点" ,14 as num from ads.calb_output_report_equip_one_hour_v where base_flag = 'XM' and area_type NOT IN ('模组','模组段','PACK') and qty_flag = '每小时' and factory_stage = 'XMA1' and prod_line_code like 'C1%' and operation_desc = '切叠' and partion_by = '2022-07-20' and shifts_team = '白班' order by equipment_id union all select workcell_name, equip_name, equipment_id, operation_desc, shifts_team, qty_flag, qty_time7 as "产量" ,case when shifts_team = '白班' then '15:30' else '03:30' end as "时间点" ,15 as num from ads.calb_output_report_equip_one_hour_v where base_flag = 'XM' and area_type NOT IN ('模组','模组段','PACK') and qty_flag = '每小时' and factory_stage = 'XMA1' and prod_line_code like 'C1%' and operation_desc = '切叠' and partion_by = '2022-07-20' and shifts_team = '白班' order by equipment_id union all select workcell_name, equip_name, equipment_id, operation_desc, shifts_team, qty_flag, qty_time8 as "产量" ,case when shifts_team = '白班' then '16:30' else '04:30' end as "时间点" ,16 as num from ads.calb_output_report_equip_one_hour_v where base_flag = 'XM' and area_type NOT IN ('模组','模组段','PACK') and qty_flag = '每小时' and factory_stage = 'XMA1' and prod_line_code like 'C1%' and operation_desc = '切叠' and partion_by = '2022-07-20' and shifts_team = '白班' order by equipment_id union all select workcell_name, equip_name, equipment_id, operation_desc, shifts_team, qty_flag, qty_time9 as "产量" ,case when shifts_team = '白班' then '17:30' else '05:30' end as "时间点" ,17 as num from ads.calb_output_report_equip_one_hour_v where base_flag = 'XM' and area_type NOT IN ('模组','模组段','PACK') and qty_flag = '每小时' and factory_stage = 'XMA1' and prod_line_code like 'C1%' and operation_desc = '切叠' and partion_by = '2022-07-20' and shifts_team = '白班' order by equipment_id union all select workcell_name, equip_name, equipment_id, operation_desc, shifts_team, qty_flag, qty_time10 as "产量" ,case when shifts_team = '白班' then '18:30' else '06:30' end as "时间点" ,18 as num from ads.calb_output_report_equip_one_hour_v where base_flag = 'XM' and area_type NOT IN ('模组','模组段','PACK') and qty_flag = '每小时' and factory_stage = 'XMA1' and prod_line_code like 'C1%' and operation_desc = '切叠' and partion_by = '2022-07-20' and shifts_team = '白班' order by equipment_id union all select workcell_name, equip_name, equipment_id, operation_desc, shifts_team, qty_flag, qty_time11 as "产量" ,case when shifts_team = '白班' then '19:30' else '07:30' end as "时间点" ,19 as num from ads.calb_output_report_equip_one_hour_v where base_flag = 'XM' and area_type NOT IN ('模组','模组段','PACK') and qty_flag = '每小时' and factory_stage = 'XMA1' and prod_line_code like 'C1%' and operation_desc = '切叠' and partion_by = '2022-07-20' and shifts_team = '白班' order by equipment_id union all select workcell_name, equip_name, equipment_id, operation_desc, shifts_team, qty_flag, qty_time12 as "实际产出" ,case when shifts_team = '白班' then '20:30' else '08:30' end as "时间点" ,20 as num from ads.calb_output_report_equip_one_hour_v where base_flag = 'XM' and area_type NOT IN ('模组','模组段','PACK') and qty_flag = '每小时' and factory_stage = 'XMA1' and prod_line_code like 'C1%' and operation_desc = '切叠' and partion_by = '2022-07-20' and shifts_team = '白班' order by equipment_id)t1order by num, equipment_id