← All tables and views
Northwind view
Products by Category
Native view in the Northwind sample database.
69rows
5 columns
Schema from the provider contract| Column | Type | Nullable | Key | References |
|---|---|---|---|---|
CategoryName | TEXT | yes | — | — |
ProductName | TEXT | yes | — | — |
QuantityPerUnit | TEXT | yes | — | — |
UnitsInStock | TEXT | yes | — | — |
Discontinued | TEXT | yes | — | — |
View definition
CREATE VIEW [Products by Category] AS
SELECT Categories.CategoryName,
Products.ProductName,
Products.QuantityPerUnit,
Products.UnitsInStock,
Products.Discontinued
FROM Categories
INNER JOIN Products ON Categories.CategoryID = Products.CategoryID
WHERE Products.Discontinued <> 1Data preview
Sample records
| CategoryName | ProductName | QuantityPerUnit | UnitsInStock | Discontinued |
|---|---|---|---|---|
| Beverages | Chai | 10 boxes x 20 bags | 39 | 0 |
| Beverages | Chang | 24 - 12 oz bottles | 17 | 0 |
| Condiments | Aniseed Syrup | 12 - 550 ml bottles | 13 | 0 |
| Condiments | Chef Anton's Cajun Seasoning | 48 - 6 oz jars | 53 | 0 |
| Condiments | Grandma's Boysenberry Spread | 12 - 8 oz jars | 120 | 0 |
| Produce | Uncle Bob's Organic Dried Pears | 12 - 1 lb pkgs. | 15 | 0 |
| Condiments | Northwoods Cranberry Sauce | 12 - 12 oz jars | 6 | 0 |
| Seafood | Ikura | 12 - 200 ml jars | 31 | 0 |