Average sale per customer

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

Reply to
Gaz
Loading thread data ...

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

Reply to
Luminox

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

Thanks for the info, nonetheless.

Reply to
Jason

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

Reply to
Michael

BeanSmart website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.