Home >> MySql >> How to select data where a field has a max value in MySql

How to select data where a field has a max value in MySql

Find a maximum value for a certain column.

Example-1

SELECT MAX(price) FROM products

Example-2

Employee Table

Name              Salary
Raj                  200000
Ravi                10000
Ram                30000
Suresh            400000

Solution

SELECT MAX(salary) FROM employee;
 
Output
400000

Post Your Comment

Next Questions
Select row with max value in GROUP BY
Select Rows with max value for each group
How to find the sum of values in a column
How do you find the sum of all the values in a column
How to find absolute value of a column
How do I get the absolute value of a column
How to find round value
How to get rounded data
How to find square root of a number
How to find the greatest value in a list
How to find the least value in a list
How To Find e raised to the power of the specified number
How to find a value extracted from a date
How to find a value extracted from a date or datetime
How to find a value extracted from an internal value

Copyright ©2022 coderraj.com. All Rights Reserved.