Build one row per customer who has orders:
- •
customer_id - •
paid_orders — orders with status paid - •
reversed_orders — orders that were refunded or cancelled - •
paid_revenue — total amount_usd of paid orders (0, not NULL, when there are none) - •
paid_share — paid_orders / all of the customer's orders, rounded to 2 decimals
Sort by customer_id.