I have two associated tables (simplified schema)
mysql> describe booking;
+----------------+------------+
| Field | Type |
+----------------+------------+
| id | int(11) |
| room_id | int(11) |
| date_from | date |
| date_to | date |
+----------------+------------+
mysql> describe room;
+-------------+------------+
| Field | Type |
+-------------+------------+
| id | int(11) |
| isDouble | tinyint(1) |
+-------------+------------+
What I need to do is get all the double (isDouble = true) rooms which are not booked during specified period (date_from, date_to) of time. I would like to get the result in one query.
Thanks for help.