[Solved] Please help querying for room’s availability [closed]


check this :

http://sqlfiddle.com/#!2/d07965/20

Use this query. Only thing you are missing is equality condition. :

select * 
from rooms A 
  left join reservations B
on A.id = B.room_id 
and B.reservation_date="2014-01-11"
and B.start_period_id <= 11 and B.end_period_id >= 11
where B.room_id is null;

Regards,
Mansi

solved Please help querying for room’s availability [closed]