Advertisement
Guest User

Untitled

a guest
Apr 18th, 2019
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. select count(*) from room
  2. where not exists(
  3. select building_id, floor_num, room_num from room r
  4. join reservation re
  5. on(
  6. r.room_num = re.room_num and
  7. r.floor_num = re.floor_num and
  8. r.building_id = re.building_id
  9. )s
  10. group by room_num, floor_num
  11. where arrival_date<=?1 and departure_date>=?1 and capacity =?2 and price =?3
  12. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement