hi,
i would like to ask if is possible to make query that make this..
from table pick name, sum1, description, sum2, idofpayment
and return only 1 unique name but make sum of all..
example
my query now return:
Oliver - 297 - for services - 100 - 1982
Marc - 324 - for services - 132 - 1982
Maria - 213 - for services - 213 - 1293
Oliver - 231 - for services - 123 - 1982
....
expected return:
Oliver - sumofsum1 = [297+231], for services - sumofsum2 =[100+123], 1982
Marc - sumofsum1[324], for services - sumofsum2[132], 1982
Maria ...
= sum all same name where id = same,
and i need return all fields because in reports it is group by idofpayment
i am able to do that as sums but not able to sum by id and return id, so i am not able to later group by..
SQL:
SELECT Data.[Name], Data.[sum1], Data.[sum2], Data.[idofpayment], Data.[Description]
FROM Data
WHERE (((Data.[Description])="for services"));
i would like to ask if is possible to make query that make this..
from table pick name, sum1, description, sum2, idofpayment
and return only 1 unique name but make sum of all..
example
my query now return:
Oliver - 297 - for services - 100 - 1982
Marc - 324 - for services - 132 - 1982
Maria - 213 - for services - 213 - 1293
Oliver - 231 - for services - 123 - 1982
....
expected return:
Oliver - sumofsum1 = [297+231], for services - sumofsum2 =[100+123], 1982
Marc - sumofsum1[324], for services - sumofsum2[132], 1982
Maria ...
= sum all same name where id = same,
and i need return all fields because in reports it is group by idofpayment
i am able to do that as sums but not able to sum by id and return id, so i am not able to later group by..
SQL:
SELECT Data.[Name], Data.[sum1], Data.[sum2], Data.[idofpayment], Data.[Description]
FROM Data
WHERE (((Data.[Description])="for services"));