首页 新闻 会员 周边 捐助

请sql 月份的报表

0
悬赏园豆:40 [已关闭问题]
<h2>SQL难题</h2> <div id="postmessage_144256" class="t_msgfont"><span style="font-family: Times New Roman;">有一张表如下,用<span class="t_tag" onclick="tagshow(event)">SQL</span>求一个结果<br /></span><span style="font-family: Times New Roman;"><span style="color: #000000;">Month<br />quantity</span></span><br /><span style="color: #000000;"><span style="font-family: 宋体;">一月&nbsp; &nbsp;&nbsp; &nbsp;</span><span style="font-family: Times New Roman;">100</span></span><br /><span style="color: #000000;"><span style="font-family: 宋体;">二月&nbsp; &nbsp;&nbsp; &nbsp; </span><span style="font-family: Times New Roman;">200</span></span><br /><span style="color: #000000;"><span style="font-family: 宋体;">三月&nbsp; &nbsp;&nbsp; &nbsp;</span><span style="font-family: Times New Roman;">230</span></span><br /><span style="color: #000000;"><span style="font-family: 宋体;">四月&nbsp; &nbsp;&nbsp; &nbsp;</span><span style="font-family: Times New Roman;">340</span></span><br /><span style="color: #000000;"><span style="font-family: 宋体;">五月&nbsp; &nbsp;&nbsp; &nbsp;</span><span style="font-family: Times New Roman;">200</span></span><br /><span style="color: #000000;"><span style="font-family: 宋体;">六月&nbsp; &nbsp;&nbsp; &nbsp;</span><span style="font-family: Times New Roman;">120</span></span><br /><span style="color: #000000;"></span><br /><span style="font-family: Times New Roman;"><span style="color: #000000;"><br /></span></span><br /><span style="font-family: Times New Roman;"><span style="color: #000000;">SQL结果:</span></span><br /><span style="font-family: Times New Roman;"><span style="color: #000000;">month&nbsp; &nbsp;quantity</span></span><br /><span style="font-family: Times New Roman;"><span style="color: #000000;">一月&nbsp; &nbsp;&nbsp;&nbsp;100</span></span><br /><span style="font-family: Times New Roman;"><span style="color: #000000;">二月&nbsp; &nbsp;&nbsp; &nbsp;300</span></span><br /><span style="font-family: Times New Roman;"><span style="color: #000000;">三月&nbsp; &nbsp;&nbsp; &nbsp; 530</span></span><br /><span style="font-family: Times New Roman;"><span style="color: #000000;">四月&nbsp; &nbsp;&nbsp; &nbsp; 870</span></span><br /><span style="font-family: Times New Roman;"><span style="color: #000000;">五月&nbsp; &nbsp;&nbsp; &nbsp; 1070</span></span><br /><span style="font-family: Times New Roman;"><span style="color: #000000;">六月&nbsp; &nbsp;&nbsp; &nbsp; 1190</span></span><br /><span style="font-family: Times New Roman;"><span style="color: #000000;"><br /></span></span><br /><span style="font-family: Times New Roman;"><span style="color: #000000;">也就是算每个月从1月到当月的累计,这个SQL怎么写,就高人指点</span></span></div> <p> </p>
jackyong的主页 jackyong | 初学一级 | 园豆:149
提问于:2009-09-03 23:03
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册