﻿ SQL: Find the highest salary from all the employees

# SQL Exercise: Find the highest salary from all the employees

## SQL employee Database: Exercise-90 with Solution

[An editor is available at the bottom of the page to write and execute the scripts.]

90. From the following table, write a SQL query to find the highest salary. Return highest salary.

Sample table: employees

Sample Solution:

``````SELECT max(salary)
FROM employees;
``````

Sample Output:

```   max
---------
6000.00
(1 row)
```

Explanation:

The said query in SQL selects the maximum value of the salary column from the employees table. The MAX() function is used to retrieve the highest value of the salary column.

Relational Algebra Expression:

Relational Algebra Tree:

## Practice Online

Sample Database: employee

Have another way to solve this solution? Contribute your code (and comments) through Disqus.

Previous SQL Exercise: Employees in ASC order of salary in department 1001.
Next SQL Exercise: Average salary, total remuneration for each type of job.

What is the difficulty level of this exercise?

Test your Programming skills with w3resource's quiz.

﻿