I have 2 tables. One is called booking and another one is called room. The columns in booking are: RoomID, startdate, enddate, customerId. The columns in room is: RoomID, size.<
Use a basic INNER JOIN to achieve that.
SELECT b.*
FROM booking b INNER JOIN room r USING(RoomID)
WHERE @date_input BETWEEN startdate AND enddate AND size = @size_input;
Change @date_input and @size_input to your real input.
Try this code
SELECT booking.*
FROM booking JOIN room USING(RoomID)
WHERE column_name BETWEEN startdate AND enddate AND size = @size_input;