Review Comments Shared by Guest in SQL

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 in SQL
Review Comments Shared by Guest in SQL

SQL Code: Review Comments Shared by Guest Solution

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;

Related:

Leave a Comment

1 × three =