Guest who paid highest charges
Write a query to display the guestid and guest name who was charged highest amount in the resort. Sort the output on the guestid.

SQL Code: Guest who paid highest charges Solution
select g.guestid, g.name
from guest g left join booking b
on b.guestid=g.guestid
where b.totalcharge=(select max(totalcharge) from booking)
order by 1;
Related:
- Review Comments Shared by Guest in SQL
- Maximum amount paid by Guest in SQL
- pointofinterest locations in each Town in SQL
- Payments made by Guest in SQL
- Fetch Resort Details in SQL
- Review Comment for all Resort in SQL
- Review Comment for star rating Resort in SQL
- Resort that charges the highest in SQL
- Cities having Summer Temperature More than Jaipur in SQL
- PointOfInterest Locations in Chennai in SQL
- Resort with Least Capacity in SQL
- Guest details and Total Charges paid in SQL
- Create View_BMS in SQL