22,210
社区成员
发帖
与我相关
我的任务
分享
select 客户编号 , 气瓶类型 = 'LPG05' , LPG05 from tb
union all
select 客户编号 , 气瓶类型 = 'LPG10' , LPG10 from tb
union all
select 客户编号 , 气瓶类型 = 'LPG15' , LPG15 from tb
order by 客户编号 , 气瓶类型
select 客户编号,'LPG05' as 气瓶类型,LPG05 as 数量 from tab
union all
select 客户编号,'LPG10' as 气瓶类型,LPG10 as 数量 from tab
union all
select 客户编号,'LPG15' as 气瓶类型,LPG15 as 数量 from tab