View STAFF_LIST
This view provides a list of all staff members, including address and store information. The view incorporates data from the STAFF and ADDRESS tables.
Query
SQL
SELECT
s.staff_id AS ID,
s.first_name||' '||s.last_name AS name,
a.address AS address,
a.postal_code AS "zip code",
a.phone AS phone,
city.city AS city,
country.country AS country,
s.store_id AS SID
FROM
staff AS s
JOIN
address AS a ON s.address_id = a.address_id
JOIN
city ON a.city_id = city.city_id
JOIN
country ON city.country_id = country.country_id
Columns
This view contains 8 columns.
ID
NAME
ADDRESS
zip code
PHONE
CITY
COUNTRY
SID