Northwind › Views
Products Above Average Price view
25 rows. A view stores a SELECT statement, not rows: each time you open it, SQLite runs the query again.
Columns
| # | Name | Type | Not null | Default | Key | References |
|---|---|---|---|---|---|---|
| 0 | ProductName |
TEXT |
no | — | ||
| 1 | UnitPrice |
REAL |
no | — |
Definition
CREATE VIEW "Products Above Average Price" AS
SELECT ProductName, UnitPrice
FROM Products
WHERE UnitPrice > (SELECT avg(UnitPrice) FROM Products)