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