Question

!!! URGENT QUESTION !!! 1. Write a query to print the details of all villas which...

!!! URGENT QUESTION !!!

1. Write a query to print the details of all villas which have never been booked.

using MySQL workbench use this question as a reference:

https://www.chegg.com/homework-help/questions-and-answers/change-column-names-whilst-creating-tables-table-villatype-column-name-villatypeid-pk-vill-q58273362

Homework Answers

Answer #1

#REQUIRED QUERY:-

select v.VillaID,v.VillaName,v.VillaCostPerDay
from Villa v
where v.VillaID not in

#THIS SUB-QUERY WILL RETURN TUPPLE CONTAINIG ALL THE VillaIDs OF VILLAS THAT HAS BEEN BOOKED SOMETIME.
(select distinct(vr.VillaID)
from Villa_Reservation vr);

# I used minimal data to check whether query is right or not-

#Sample data in Villa table

#Sample data in Villa_Reservation Table

#OUTPUT OF QUERY:-

#THANK YOU

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions