Hi Friends,
I've a query like this:
Select user_id,table_no,currency,sum(amount) as amount from users group by user_id,table_no,currency.
Userid tableno CAD amount USD amount
-1-----10---------- 20 ---------- 20
-1-----20------------------------ 10
-1-----30-----------10----------- 20
I have two currencies,CAD(canadian dollars) and USD(US dollars) and one user can sit on different tables.
Is there a way by which I can get the sub-total of each user for both USD and CAD for all the tables he is
playing In.Or,I've to use java and compute the sum,like this:
Userid tableno CAD amount USD amount
-1-----10---------- 20 ---------- 20
-1-----20------------------------ 10
-1-----30-----------10----------- 20
--------------------30----------- 50
Hope anyone of you would help me out ..thanks