select 
    c.name as customer_name,
    sum(price) as total_travel_cost,
    count(*) as order_count,
    round(sum(price)/count(*),2) as avg_order_price
from bookings b
join customers c on b.customer_id=c.id
join packages p on b.package_id=p.id
where year(booking_date)=2024 
group by 1
having sum(price)>10000
order by sum(price) desc;