BILLNO BILL_DATE AMOUNT 1 27-SEP-13 100 2 27-SEP-13 100 3 27-SEP-13 100 4 27-SEP-13 100 5 27-SEP-13 100 6 27-SEP-13 100 7 27-SEP-13 1000 8 27-SEP-13 1000 9 27-SEP-13 150 10 27-SEP-13 150 11 27-SEP-13 150
表定义是:
BILLNO NUMBER(10) BILL_DATE DATE AMOUNT NUMBER(10)
我想计算不同(日期)的总和(金额)
答案 0 :(得分:1)
select trunc(bill_date),
sum(amount)
from bill
group by trunc(bill_date);