Multiply two SQL fields and SUM ?
Posted on 2006-11-30
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?