首页 > 代码库 > 经典sql总结(2)
经典sql总结(2)
如何做呢,跟上文区别不大。
我建个表,输入以下
1 select year,2 (select amount from info2 as t2 where t2.year=t.year and t2.mouth=1) as m1,3 (select amount from info2 as t3 where t3.year=t.year and t3.mouth=2) as m2,4 (select amount from info2 as t4 where t4.year=t.year and t4.mouth=3) as m35 from info2 as t group by year;
经典sql总结(2)
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。