SQL Exercises

PostgreSQL: Intermediate SQL WHERE Clause Exercises

0 Exercises
~0 min

This guide is specifically for PostgreSQL syntax.

Intermediate-level SQL WHERE Clause practice exercises with solutions.

Exercise 1

Question: Find employees who are NOT in the Engineering or Marketing departments.

SELECT * FROM employees WHERE department NOT IN ('Engineering', 'Marketing');

NOT IN excludes specified values. This is cleaner than writing multiple AND conditions.


PostgreSQL-Specific Notes

This page covers PostgreSQL syntax. Other databases may have different syntax for similar operations.

Related Content

From Our Blog

Ready for more practice?

Join SQL Mastery and get access to interactive exercises, quizzes, and more.