|
if it's for MySQL then;
SELECT day_num,qty,room_type FROM rooms WHERE day_num BETWEEN 25 AND 27 AND qty > 0 ORDER BY qty ASC LIMIT 1;
for SQL server
SELECT TOP 1 day_num,qty,room_type FROM rooms WHERE day_num BETWEEN 25 AND 27 AND qty > 0 ORDER BY qty ASC ;
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
|