I am wanting to write a simple query to show web sales, specifically MOS 52 and 57. I want the query to break out total ticket sales, total fees collected and total tix+fees. I have:
select year(order_dt) "year", month(order_dt) "month", day(order_dt) "day",sum(tot_due_amt) "tot_due_sum", sum(tot_ticket_purch_amt) "tot_ticket_sum", sum(tot_fee_amt) "tot_fee_sum"from t_orderwhere mos in (52,57)group by year(order_dt), month(order_dt), day(order_dt)order by [year], [month], [day]
I had been testing this but I'm seeing a discrepancy. The "tot_ticket_sum" + "tot_fee_sum" does not always equal "tot_due_sum". I am figuring ths is due to my lack of knowedge of how fees and ticket sales are captured by Tessitura.
What am I doing wrong and what have I overlooked?
Thanks to all!
If you have exchanges in an order, the tot_ticket_purch_amt would be offset by the tot_ticket_return_amt. So if you're looking for the total tickets due amt I'm pretty sure it's the sum of those two.
Great! That explains a lot of what I was seeing... Thank you.