Brainlag
  1. SQL
  2. Advanced
29/39 lessons

Views, saving a query under a name

30 min6 exercisesPremium

Save a query as a view with CREATE VIEW, query it like a table, and use views to keep one definition of revenue that every report shares.

The skill
Save a query under a name so every report uses the same definition.
You make
The views behind an online shop's revenue reports.

Premium lesson

£7.99 a month or £59 a year. Cancel any time.

Builds on 28 Normalisation, one fact in one place. Free to try: SQL Foundations and the playground.

Step 1 of 9
exercise_1.sql

You've reached the good stuff.

6 exercises in this lesson, checked as you type. Premium opens every lesson after Foundations, in all four courses.

SQLite