SUM FUNCTION Does not work
Good evening.
I need help.
I have this query to some up but the SUM function doesn't work.
ex.
CHECK_NUM INVNO APNO DATE CUST CUST_ID AMOUNT
39414 2147 5982 13-SEP-12 RGG Print & Design 1680 180
39414 2147 5955 12-SEP-12 RGG Print & Design 10920 1170
BUT WHEN I TRY TO SUM IT UP.
select check_num, invno, cust, sum(amount)
from sampletable
group by check_num, invno, cust, amount
the result goes like this.
CHECK_NUM INVNO CUST AMOUNT
39414 2147 RGG Print & Design 180
39414 2147 RGG Print & Design 1170
by the way i'am using sql developer.
Thank you in advance,
rey