UPDATE: seems like force alarm and I misinterpreted my result set and actually query returns what it is supposed to return. Oops. Thanks a lot to everyone for helping!
What's wrong with my query? The incorrect results are being produced.
SELECT
utm_source as source,
utm_medium as medium,
utm_campaign as campaign,
utm_content as content,
COUNT(order_id) as orders,
COUNT(DISTINCT _customer_user) as customers,
SUM(_order_total) as revenue,
SUM(_refund_amount) as refunded,
SUM(_order_total) - SUM(_refund_amount) as net,
(SUM(_order_total) - SUM(_refund_amount))/COUNT(DISTINCT _customer_user) as 'average ticket'
FROM wp_realtime_utm_tracking_utms
GROUP BY source, medium, campaign, content
COUNT(DISTINCT _customer_user)is the wrong divisor.