日期:2014-05-17 浏览次数:20902 次
create table TEST ( ID VARCHAR2(5) , RE_DATE VARCHAR2(10), CL_DATE VARCHAR2(10), MONEY NUMBER ) insert into test (ID, RE_DATE,CL_DATE,MONEY) values ('1', '2012-02-10', '2012-02-20', '101'); insert into test (ID, RE_DATE,CL_DATE,MONEY) values ('2', '2012-02-10', '2012-02-20', '102'); insert into test (ID, RE_DATE,CL_DATE,MONEY) values ('3', '2012-02-16', '', '55'); insert into test (ID, RE_DATE,CL_DATE,MONEY) values ('4', '2012-04-15', '2012-05-20', '50');
<table border='1'> <tr> <td>月份</td> <td>当月已完成条数</td> <td>当月已完成总金额</td> <td>累计目前未完成条数</td> <td>累计目前未完成总金额</td> </tr> <tr> <td>2012-02</td> <td>2</td> <td>203</td> <td>1</td> <td>55</td> </tr> <tr> <td>2012-04</td> <td>0</td> <td>0</td> <td>2</td> <td>105</td> </tr> <tr> <td>2012-05</td> <td>1</td> <td>50</td> <td>1</td> <td>55</td> </tr> <tr> <td>2012-06</td> <td>0</td> <td>0</td> <td>1</td> <td>55</td> </tr> </table>