首页 新闻 会员 周边

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

0
[已解决问题] 解决于 2012-09-29 11:12

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

一個亼冷暖自知的主页 一個亼冷暖自知 | 初学一级 | 园豆:65
提问于:2012-09-28 16:29
< >
分享
最佳答案
0

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

不知道是不是楼主想要的结果

奖励园豆:5
轻狂の书生 | 小虾三级 |园豆:1042 | 2012-09-29 09:45

谢谢了!哥们!

一個亼冷暖自知 | 园豆:65 (初学一级) | 2012-09-29 11:12
其他回答(1)
0

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"

大概是这个意思吧,你可以试下。

zhongweis | 园豆:30 (初学一级) | 2012-09-28 19:10

不对噢!T.T

支持(0) 反对(0) 一個亼冷暖自知 | 园豆:65 (初学一级) | 2012-09-29 09:13
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册