Day – 18 :
IS NULL Operator, ORDER BY Operator,
LIMIT Operator & DISTINCT Operator.
Course created by Satish Dhawale | www.skillcourse.in
IS NULL Operator
Find employees where the email column is NULL (if applicable).
SELECT first_name, last_name, email
FROM employees
WHERE email IS NULL;
Find employees whose email addresses end with gmail.com.
ORDER BY Operator
List employees sorted by salary in descending order.
SELECT first_name, last_name, salary
FROM employees
ORDER BY salary DESC;
Find employees whose email addresses end with gmail.com.
LIMIT Operator
Retrieve the top 5 highest-paid employees.
SELECT first_name, last_name, salary
FROM employees
ORDER BY salary DESC
LIMIT 5;
Find employees whose email addresses end with gmail.com.
DISTINCT Operator
Retrieve a list of unique departments
SELECT DISTINCT department
FROM employees;