The Maximum or Minimum Value for a Column

 

“What is the highest item number?"

SELECT MAX(entries) AS entries FROM shop;
+---------+
|entries |
+---------+
| 152 |
+---------+

“What is the lowest item number?"

SELECT MIN(entries) AS entries FROM shop;
+---------+ |entries |
+---------+
| 4 |
+---------+
  • 92
  • 10-May-2017
  • 560 Views