有图有真相!过个Happy的节日吧!来看看了!!关于查询

https://img2.mukewang.com/5b5ebdd00001155b02880202.jpg

这样怎么做呢?麻烦大家帮写一下!祝大家双节Happy!!

森栏
浏览 774回答 2
2回答

料青山看我应如是

select oilstandard, sum(case PIN when '93#' then RetailLiterprice else 0 end) as '93#', sum(case PIN when '97#' then RetailLiterprice else 0 end) as '97#', sum(case PIN when '0#' then RetailLiterprice else 0 end) as '0#' from cnblogs group by OilStandard不知道是不是楼主想要的结果

繁星点点滴滴

select RetailiterPrice1=(select RetailiterPrice from ”table“ where PIN=”93#“),RetailiterPrice2=(select RetailiterPrice from ”table“ where PIN=”97#“),RetailiterPrice3=(select RetailiterPrice from ”table“ where PIN=”0#“) from  "table" where oilstandard="国III"大概是这个意思吧,你可以试下。
打开App,查看更多内容
随时随地看视频慕课网APP