query results question

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_order
where 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!



[edited by: Randall Mitchell at 10:08 AM (GMT -6) on 2 Dec 2011]
Parents Reply Children
No Data