数据分析统计

 select  
    --count (0)
    --sum(OI.AUNT )/10 
    to_char(OI.CRE_DATE,'yyyy-mm-dd hh24')  d , count(to_char(OI.CREA_DATE,'yyyy-mm-dd hh24') ) c
    from eall.orer_ite oi where 
    OI.CRATDATE    between  to_date('2011-08-06 00:00:00','yyyy-mm-dd hh24:mi:ss') and  to_date('2011-08-07 00:00:00','yyyy-mm-dd hh24:mi:ss')
   and OI.STAS=4 
   --order by OI.AMNT desc
    group by  to_char(OI.CRETE_DATE,'yyyy-mm-dd hh24')
    order by c  desc
   

    
按小时统计数据   

 

你可能感兴趣的:(c,数据分析,Date)