Average sale per customer

May 21, 2008 3 Replies

Hi Can someone remind me wher to get this from SO please or how to change a repotr to give the info. Many Thanks


Sales divided by Transactions:

Trx = (select count(distinct TransactionEntry.TransactionNumber) from TransactionEntry left join [Transaction] on [Transaction].TransactionNumber TransactionEntry.TransactionNumber and [Transaction].StoreID = TransactionEntry.StoreID where ([Transaction].Time >= @LYStart and [Transaction].Time = @LYStart and [Transaction].Time Hi

Nope. That's average sales per transaction. The question was average sales per *customer*.

Thanks for the info, nonetheless.

Something like this

SELECT Datepart([day], Time) as Day, count(TransactionNumber)as 'Customer Count', sum(Total) as Sales, avg(Total) as 'Average Sales', sum(SalesTax) as Tax FROM [transaction] WHERE time between '2008-04-01' and '2008-05-01' GROUP BY datepart([day],Time) ORDER BY datepart([day],Time) asc

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required