select cust_id,total_ordered from ( select order_num,sum(item_price*quantity) as total_ordered from OrderItems group by order_num )as oo inner join Orders as orde on oo.order_num=orde.order_num order by total_ordered desc