Review Comments Shared by Guest in SQL

Question:

Review Comments Shared by Guest

Display the review comments shared by the guest. Write a query to display the resort name , guest name and guest comment. Give alias name to guest name as GUEST NAME. Sort the result set based on Resort name and Guest Name. 

Review Comments Shared by Guest

Code:

Main.sql

select rs.resortname, g.name as "GUEST NAME", r.comments
from guest g join review r
        on r.guestid=g.guestid join resort rs
        on r.resortid=rs.resortid
order by 1, 2;

Recommended:

Leave a Comment

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

x