![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi All, I'm using the following query to select records in a database: SELECT (consumpties.prijs*aantallen.aantal) AS subtotaal, * FROM Leden INNER JOIN (Consumpties INNER JOIN Aantallen ON Consumpties.Id = Aantallen.consumptie) ON Leden.id = Aantallen.Leden WHERE Aantallen.Leden=" & naam_id & " ORDER BY consumpties.soort, consumpties.naam The field subtotaal is created by multiplying two fields with each other. Now I want to add all values in this subtotaal field, but I don't know how. I know I have to use the sum() thingy, but I don't know how I should build it into the query I made. Please, can anybody help me? with regards, Pascal Herms |
![]() |
| Thread Tools | |
| Display Modes | |
| |