twentythree
asked on
Multiply two SQL fields and SUM ?
Is it possible to multiple 2 SQL fields and then summarize them?
What I'm trying to do is calculate our top 100 spending customers. The fields I need to multiple are called qty * item_price.
Then I'm wanting to take those values and add up all the items by ID (which is the invoice ID ) and SUM them so that basically I can get a total value that each invoice has spent.
Is this possible to write with SQL?
What I'm trying to do is calculate our top 100 spending customers. The fields I need to multiple are called qty * item_price.
Then I'm wanting to take those values and add up all the items by ID (which is the invoice ID ) and SUM them so that basically I can get a total value that each invoice has spent.
Is this possible to write with SQL?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.