经典sql总结(2)

经典sql总结(2)

如何做呢,跟上文区别不大。

我建个表,输入以下

经典sql总结(2)

 select year,
(select amount from info2 as t2 where t2.year=t.year and t2.mouth=1) as m1,
(select amount from info2 as t3 where t3.year=t.year and t3.mouth=2) as m2,
(select amount from info2 as t4 where t4.year=t.year and t4.mouth=3) as m3
from info2 as t group by year;
上一篇:loadrunner11和https


下一篇:Linux----------httpd的简介和安装及使用