Forum

SQL Query to displa...
 
Share:
Notifications
Clear all

SQL Query to display BOOKING and the PAYMENT made y the Guest


Posts: 17
Topic starter
(@rahul)
Active Member
Joined: 4 years ago

Write a query to display the booking and the payment made by the 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 the guest. 

1 Reply
Posts: 18
Guest
(@Deepak Raj)
Active Member
Joined: 4 years ago

You can try this query 

Select a.bookingID, a.totalcharge, b.name as GuestName, c.ResortName,
a.todate,a.fromdate,a.adultCount, a.childCount, a.totalcharge
from
Booking a,
Guest b,
Resort c
Where
a.guestid=b.guestID AND b.resortID=c.resortID
Order by b.guestid asc
Reply

Self Learning Video Tutorials - Software Course

Leave a reply

Author Name

Author Email

Title *

 
Preview 0 Revisions Saved
Share: