这样怎么做呢?麻烦大家帮写一下!祝大家双节Happy!!
2 回答
料青山看我应如是
TA贡献1772条经验 获得超8个赞
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
不知道是不是楼主想要的结果
繁星点点滴滴
TA贡献1803条经验 获得超3个赞
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"
大概是这个意思吧,你可以试下。
- 2 回答
- 0 关注
- 773 浏览
添加回答
举报
0/150
提交
取消