hello friends
i hav a problem that i face today
problem is
i have a table in Mysql
TableName---- wages
ok
records in that table are like
wId Uid amount
1 1 10000
2 1 10000
3 2 20000
4 2 20000
5 2 20000
6 3 30000
7 3 30000
ok
so i want sum of amount of distinct Uid
i used foll. query
Select * from wages group by Uid
i got result for above
wId Uid amount
1 1 10000
3 2 20000
6 3 30000
now i want sum of amount of these records
means (10000+20000+30 000)
so how can use one query do produce this result.
Please help me.
i hav a problem that i face today
problem is
i have a table in Mysql
TableName---- wages
ok
records in that table are like
wId Uid amount
1 1 10000
2 1 10000
3 2 20000
4 2 20000
5 2 20000
6 3 30000
7 3 30000
ok
so i want sum of amount of distinct Uid
i used foll. query
Select * from wages group by Uid
i got result for above
wId Uid amount
1 1 10000
3 2 20000
6 3 30000
now i want sum of amount of these records
means (10000+20000+30 000)
so how can use one query do produce this result.
Please help me.
Comment