w3resource
w3resource logo
SQLite exercises

SQLite Exercise: Get the difference between the highest and lowest salaries

Write a query to get the difference between the highest and lowest salaries.

Sample table : employees


SQLite Code:

SELECT MAX(salary) - MIN(salary) DIFFERENCE
FROM employees;

Output:

DIFFERENCE
----------
21900

Sqlite Online Editor


Structure of 'hr' database :

hr database

Improve this sample solution and post your code through Disqus.



Amazon promo codes to get huge discounts for limited period (USA only).