Table example
id | name | price |
-----------------------
1 | john | 300 |
-----------------------
2 | michael | 400 |
-----------------------
3 | michelle | 250 |
-----------------------
I will get the smallest number in the table using this query
SELECT id, name, MIN(price) FROM table
The result will be as follows:
_______________________
id | name | price |
-----------------------
1 | michelle | 250 |
I want the result to be as follows:
id | name | price |
-----------------------
3 | michelle | 250 |
-----------------------
Thanks in advance!
source
share