Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2012

    Unanswered: Summing Columns In A Query

    Hey guys,

    I have setup a query in order to work out the profitability of a particular customer.

    The profit is the selling price minus the unit cost then mulitplied by the sum of quantity. I've used the sum of the quantity as any single customer can purchase many of the same product.

    I have attached the image of what it looks like so far. What I want to know is how do you sum the total of the profit column so I can get an overall figure for the profit from a specific customer?
    Attached Thumbnails Attached Thumbnails Profitability.jpg  

  2. #2
    Join Date
    Mar 2009
    Provided Answers: 15
    You can use the SUM SQL function however it will require a GROUP BY clause in the query to create a sum for each client. If you want to keep the details for each client too, you'll have to use a sub-query. Please post the SQL of the query as well as any relevant information about the table(s) involved.
    Have a nice day!

  3. #3
    Join Date
    Nov 2011
    Currently in Kabul Afghanistan
    Sinndo is correct had the same issue with keeping track of certain items we were counting,(Items, Category, Cost and Who Requested. Think about an approach where the summary query the builds upon a first select query. The second query being a totals type query.

    What else is handy is that depending on the version of MS Access you can pop the results into a pivot table, then slice and dice and drill down.

    Fighting Terror One Query @ a Time

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts