← All tables and views
Northwind view
Customer and Suppliers by City
Native view in the Northwind sample database.
122rows
4 columns
Schema from the provider contract| Column | Type | Nullable | Key | References |
|---|---|---|---|---|
City | TEXT | yes | — | — |
CompanyName | TEXT | yes | — | — |
ContactName | TEXT | yes | — | — |
Relationship | TEXT | yes | — | — |
View definition
CREATE VIEW [Customer and Suppliers by City]
AS
SELECT City,
CompanyName,
ContactName,
'Customers' AS Relationship
FROM Customers
UNION
SELECT City,
CompanyName,
ContactName,
'Suppliers'
FROM Suppliers
ORDER BY City, CompanyNameData preview
Sample records
| City | CompanyName | ContactName | Relationship |
|---|---|---|---|
| NULL | IT | Val2 | Customers |
| NULL | IT | Valon Hoti | Customers |
| Aachen | Drachenblut Delikatessen | Sven Ottlieb | Customers |
| Albuquerque | Rattlesnake Canyon Grocery | Paula Wilson | Customers |
| Anchorage | Old World Delicatessen | Rene Phillips | Customers |
| Ann Arbor | Grandma Kelly's Homestead | Regina Murphy | Suppliers |
| Annecy | Gai pâturage | Eliane Noz | Suppliers |
| Barcelona | Galería del gastrónomo | Eduardo Saavedra | Customers |