Skip to Content
Former Member
Jun 23, 2015 at 01:35 PM

Sales Analysis Query


Hi all

Hope you can help, I am trying to create a sales analysis query that accurately reflects sales per customer, including both invoices and credits. Basically trying to write a query that will give me the data from the Sales Analysis screen in B1.

It would look something like this:

Customer Total Sales (£) Total GP (£)

I know that this is available in the sales analysis screen but I need a query for various different reasons.

I have tried using a UNION clause in my query to join the invoice and credit tables, but this gives two separate lines for a customer and I want just one line. I don't know if I should be using the invoice tables - I would appreciate any help.

Many thanks