I need a help with forming a query for the following table..
Customerid Amnt Mode
1 200 Internet
2 100 Internet
3 900 ATM
1 300 ATM
1 90 Internet
4 10000 ATM
2 500 ATM
3 100 Internet
I want a query which will get me the sum of amount for all modes and sum of amount for Internet mode alone for all customers..I want the result in one row itself...i.e., something like the following
Customerid TotalAmnt InternetAmt
1 590 290
2 600 100
3 1000 100
4 10000 0
Please help in querying for this..
Customerid Amnt Mode
1 200 Internet
2 100 Internet
3 900 ATM
1 300 ATM
1 90 Internet
4 10000 ATM
2 500 ATM
3 100 Internet
I want a query which will get me the sum of amount for all modes and sum of amount for Internet mode alone for all customers..I want the result in one row itself...i.e., something like the following
Customerid TotalAmnt InternetAmt
1 590 290
2 600 100
3 1000 100
4 10000 0
Please help in querying for this..
Comment