Question: I am practicing SQL queries using a hotel booking database in MYSQL.
There are 4 tables which are Guest, room, hotel and booking in the database.
I want to write a SQL query to retrieve details of hotel rooms which are having the lowest price. There are more than one record with the minimum price and the task is to retrieve all of them and not only one record.

```
SELECT * FROM room ORDER BY Price LIMIT 1;

```

This will give me only one record and I know there are more than one record yet I don't know exactly how many records are there with the minimum price so that I guess I can't use ORDER BY and LIMIT to perform this task.

Following is a part of the table that I want to query.
Table Name: Room.

[![Table Name Room:](https://i.stack.imgur.com/J9won.png)](https://i.stack.imgur.com/J9won.png)

In this room table, Hotel\_No references Hotel\_No in the hotel table and the PRIMARY KEY of this table is both Hotel\_No and Room\_No together.

How do I do this in MYSQL?

Answer: 
Alternatively you can try
SELECT \*
FROM room
WHERE price = ( SELECT MIN(price) FROM room )
```
SELECT TOP 1 hotel.hotelnos, hotel.roomnos, hotel.roomtype, hotel.price
FROM hotel
ORDER BY hotel.price;

```

this might vary depending on the type of SQL, e.g Mysql,MSSQL,etc