Skip to Main Content
The world's most popular open source database
Contact MySQL  | 
Login  |  Register
  • MySQL.com
  • Downloads
  • Documentation
  • Developer Zone
Developer Zone Downloads MySQL.com
Documentation
  • MySQL Server
  • MySQL Enterprise
  • Workbench
  • InnoDB Cluster
  • MySQL NDB Cluster
  • Connectors
  • More
  • MySQL.com
  • Downloads
  • Developer Zone
Section Menu:  
Documentation Home
MySQL Tutorial
  • Preface and Legal Notices
  • Tutorial
  • Connecting to and Disconnecting from the Server
  • Entering Queries
  • Creating and Using a Database
    • Creating and Selecting a Database
    • Creating a Table
    • Loading Data into a Table
    • Retrieving Information from a Table
      • Selecting All Data
      • Selecting Particular Rows
      • Selecting Particular Columns
      • Sorting Rows
      • Date Calculations
      • Working with NULL Values
      • Pattern Matching
      • Counting Rows
      • Using More Than one Table
  • Getting Information About Databases and Tables
  • Using mysql in Batch Mode
  • Examples of Common Queries
    • The Maximum Value for a Column
    • The Row Holding the Maximum of a Certain Column
    • Maximum of Column per Group
    • The Rows Holding the Group-wise Maximum of a Certain Column
    • Using User-Defined Variables
    • Using Foreign Keys
    • Searching on Two Keys
    • Calculating Visits Per Day
    • Using AUTO_INCREMENT
  • Using MySQL with Apache
Download this Excerpt
PDF (US Ltr) - 199.2Kb
PDF (A4) - 200.1Kb


version 5.7
8.3
8.0  current
MySQL Tutorial  /  Examples of Common Queries  /  The Maximum Value for a Column

7.1 The Maximum Value for a Column

“What is the highest item number?”

SELECT MAX(article) AS article FROM shop;
+---------+
| article |
+---------+
|       4 |
+---------+

PREV   HOME   UP   NEXT
Download this Excerpt
PDF (US Ltr) - 199.2Kb
PDF (A4) - 200.1Kb
Contact MySQL Sales
USA/Canada: +1-866-221-0634   (More Countries »)
  © 2026 Oracle

  • Products
  • MySQL HeatWave
  • MySQL Enterprise Edition
  • MySQL Standard Edition
  • MySQL Classic Edition
  • MySQL Cluster CGE
  • MySQL Embedded (OEM/ISV)
  • Services
  • Training
  • Certification
  • Support
  • Downloads
  • MySQL Community Server
  • MySQL NDB Cluster
  • MySQL Shell
  • MySQL Router
  • MySQL Workbench
  • Documentation
  • MySQL Reference Manual
  • MySQL Workbench
  • MySQL NDB Cluster
  • MySQL Connectors
  • Topic Guides
  • About MySQL
  • Contact Us
  • Blogs
  • How to Buy
  • Partners
  • Job Opportunities
  • Site Map
  © 2026 Oracle
Privacy / Do Not Sell My Info | Terms of Use | Trademark Policy |