SQL

SQL


select hotels.hid, hotels.uri from hotels
join hotel_options on hotels.hid = hotel_options.hid
where true
and hotels.hid in ( select hid from hotel_options where hid = hotels.hid and optionid = 1 and value = 7)
and hotels.hid in ( select hid from hotel_options where hid = hotels.hid and optionid = 12 and value < 150)

group by hid;

Report Page