日期:2014-05-17 浏览次数:20986 次
订单表ctoc_order 日期字段ORDER_CREATE_TIME 金额PRODUCT_AMOUNT 查询2011-06-28到2012-05-28这段时间,每天交易总金额 SELECT ORDER_CREATE_TIME,sum(PRODUCT_AMOUNT) FROM ctoc_order WHERE 1=1 and ORDER_SUBSTATUS in(0,1) and ORDER_CREATE_TIME between to_date('2011-06-28','yyyy-MM-dd') and to_date('2012-05-28','yyyy-MM-dd') group by ORDER_CREATE_TIME
订单表ctoc_order 日期字段ORDER_CREATE_TIME 金额PRODUCT_AMOUNT 查询2011-06-28到2012-05-28这段时间,每天交易总金额 SELECT trunc(ORDER_CREATE_TIME),sum(PRODUCT_AMOUNT) FROM ctoc_order WHERE 1=1 and ORDER_SUBSTATUS in(0,1) and ORDER_CREATE_TIME between to_date('2011-06-28','yyyy-MM-dd') and to_date('2012-05-28','yyyy-MM-dd') group by trunc(ORDER_CREATE_TIME)