C
Clint
Hi, I actually asked this question already, but I cannot find the
answer or the question for the life of me so I am going to ask it
again. I need to find the Number of customers that a company has based
on the invoices. I can't just Count normally because it will count a
customer with 2 purchases as 2 customers. How do I set this up to only
count the Sold to Customer # once? I'm guessing I have to change it in
SQL. Here is the current syntax. What should it look like? Thanks so
much.
SELECT Left([customer table].[Zip/Postal Code],3) AS FSA, Sum([order
table].SubTotal) AS [Total Sales], Avg([order table].SubTotal) AS
[Average Sale], Count([order table].[Sold to Customer]) AS [CountOfSold
to Customer]
FROM [customer table] INNER JOIN [order table] ON [customer
table].[Cust#] = [order table].[Sold to Customer]
GROUP BY Left([customer table].[Zip/Postal Code],3);
answer or the question for the life of me so I am going to ask it
again. I need to find the Number of customers that a company has based
on the invoices. I can't just Count normally because it will count a
customer with 2 purchases as 2 customers. How do I set this up to only
count the Sold to Customer # once? I'm guessing I have to change it in
SQL. Here is the current syntax. What should it look like? Thanks so
much.
SELECT Left([customer table].[Zip/Postal Code],3) AS FSA, Sum([order
table].SubTotal) AS [Total Sales], Avg([order table].SubTotal) AS
[Average Sale], Count([order table].[Sold to Customer]) AS [CountOfSold
to Customer]
FROM [customer table] INNER JOIN [order table] ON [customer
table].[Cust#] = [order table].[Sold to Customer]
GROUP BY Left([customer table].[Zip/Postal Code],3);