w3resource
SQL exercises

SQL exercises on employee Database: Display all the unique job in descending order

SQL employee Database: Exercise-68 with Solution

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

68. Write a query in SQL to display all the unique job in descending order.

Sample table: employees


Sample Solution:

SELECT DISTINCT job_name
FROM employees
ORDER BY job_name DESC;

Sample Output:

 job_name
-----------
 SALESMAN
 PRESIDENT
 MANAGER
 CLERK
 ANALYST
(5 rows)

Practice Online


Sample Database: employee

employee database structure

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

Previous: Write a query in SQL to list the details of the employees in ascending order to the department_id and descending order to the jobs.
Next: Write a query in SQL to list the id, name, monthly salary, daily salary of all the employees in the ascending order of their annual salary.

What is the difficulty level of this exercise?