SQL: Subqueries & Views

Wishlist Share

About Course

Take your SQL further with subqueries, common table expressions and views. Learn scalar subqueries, IN and EXISTS, correlated subqueries, derived tables and WITH clauses, the NOT IN and NULL trap, and how to create and use views to simplify queries and limit access. Examples tested in SQLite.

Examples were tested in SQLite 3. Support for features such as CREATE OR REPLACE VIEW, materialised views and updatable views varies between database products.

What Will You Learn?

  • Write subqueries in WHERE, SELECT and FROM clauses Use IN, EXISTS and NOT EXISTS correctly, including the NOT IN and NULL trap Make complex queries readable with common table expressions (WITH) Create, use and manage views for reuse and access control

Course Content

Course Lessons

  • Subqueries in WHERE
  • EXISTS, correlated subqueries and the NULL trap
  • Derived tables and common table expressions
  • Views

Sources & Further Reading
The official guidance this course is based on.

Final Assessment

Student Ratings & Reviews

No Review Yet
No Review Yet

Want to receive push notifications for all major on-site activities?

✕