本文目录一览

1,每天的电煤柴油价格

价格报表的网站 www.huanancoal.com/
中国煤炭市场网

每天的电煤柴油价格

2,有两张表S用户表C车型表SC价格表查询实现如图的效果

SELECT S.NAME AS 姓名, SUM(CASE WHEN SC.CID = 1 THEN SC.SMONEY ELSE 0 END) AS 宝马, SUM(CASE WHEN SC.CID = 2 THEN SC.SMONEY ELSE 0 END) AS 丰田, SUM(CASE WHEN SC.CID = 3 THEN SC.SMONEY ELSE 0 END) AS 大众FROM S, SC WHERE S.ID = SC.SID GROUP BY SC.SID
select s.name as 姓名, sum(case when sc.cid=1 then sc.sMoney else 0 end) as 宝马, sum(case when sc.cid=2 then sc.sMoney else 0 end) as 丰田, sum(case when sc.cid=3 then sc.sMoney else 0 end) as 大众 from s,sc where s.id=sc.sid group by sc.sid;

有两张表S用户表C车型表SC价格表查询实现如图的效果


文章TAG:极兔速递价格报表官网速递  价格  报表  
下一篇