...Curency,Money,Date......
 ...币种,  金额, 日期.....

解决方案 »

  1.   

    TO  jiezhi(相逢何必曾相识) 兄
    可以吗。
      

  2.   

    select 
    (select sum(currency) from table1 where to_char(fs_date,'yyyymm')=to_char(sysdate,'yyyymm')),
    (select count(*) from table1 where to_char(fs_date,'yyyymm')=to_char(sysdate,'yyyymm')),
    (select sum(currency) from table1 where to_char(fs_date,'yyyymmdd')<=to_char(sysdate,'yyyymmdd')),
    (select count(*)) from table1 where to_char(fs_date,'yyyymmdd')<=to_char(sysdate,'yyyymmdd')),
    (select sum(currency) from table1 where to_char(fs_date,'yyyy')<=(to_char(sysdate,'yyyy')-1) and to_char(fs_date,'mm')=to_char(sysdate,'mm')),
    (select count(*) from table1 where to_char(fs_date,'yyyy')<=(to_char(sysdate,'yyyy')-1) and to_char(fs_date,'mm')=to_char(sysdate,'mm'))
    from dual;
      

  3.   

    (select sum(currency) from table1 where to_char(fs_date,'yyyymmdd')<=to_char(sysdate,'yyyymmdd')),
    (select count(*)) from table1 where to_char(fs_date,'yyyymmdd')<=to_char(sysdate,'yyyymmdd')),
    这段好像不行,我是要求出今年年初到当前月的金额,笔数。
      

  4.   

    TO  jiezhi(相逢何必曾相识) 兄
    谢谢你给我提供这个思路,可以做到了谢谢。
      

  5.   

    (select sum(currency) from table1 where to_char(fs_date,'yyyy') = to_char(sysdate, 'yyyy') and to_char(fs_date,'mm') <= to_char(sysdate,'mm')),
    (select count(*)) from table1 where to_char(fs_date,'yyyy') = to_char(sysdate, 'yyyy') and to_char(fs_date,'mm') <= to_char(sysdate,'mm')),