Payments made by Guest in SQL


Payments made by Guest

Write a query to display the booking and the payment made by guest.  Display guest name, resort name, from date, to date, adult count, child count and total charges made by guest. Sort the output in the ascending order of guestid.

Payments made by Guest



select, r.resortname, b.fromdate, b.todate, b.adultcount, b.childcount, b.totalcharge
from guest g join booking b
           on g.guestid=b.guestid
           join resort r
           on b.resortid= r.resortid
order by g.guestid;


Leave a Comment

Your email address will not be published. Required fields are marked *