所有栏目 | 云社区 美国云服务器[国内云主机商]
你的位置:首页 > 云社区 » 正文

A表转换成B表的SQL语句怎么写?

发布时间:2020-04-15 16:56:08

资讯分类:a表  b表  sql  语句  房间  日期  酒店
A表转换成B表的SQL语句怎么写?

select our 酒店,our 房间,your 酒店,your 房间,早餐分数, max(case 日期 when '2013/11/10' then our 价格 else 0 end ) '2013/11/10', max(case 日期 when '2013/11/10' then your 价格 else 0 end ) '2013/11/10', max(case 日期 when '2013/11/11' then our 价格 else 0 end ) '2013/11/11', max(case 日期 when '2013/11/11' then your 价格 else 0 end ) '2013/11/11',from A group by our 酒店,our 房间,your 酒店,your 房间,早餐分数;

留言与评论(共有 0 条评论)
   
验证码:
Top