Hi Can someone remind me wher to get this from SO please or how to change a repotr to give the info. Many Thanks
- posted
15 years ago
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
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.