Skip to main content

public.customer_list

Description

Table Definition
CREATE VIEW customer_list AS (
SELECT cu.customer_id AS id,
((cu.first_name || ' '::text) || cu.last_name) AS name,
a.address,
a.postal_code AS "zip code",
a.phone,
city.city,
country.country,
CASE
WHEN cu.activebool THEN 'active'::text
ELSE ''::text
END AS notes,
cu.store_id AS sid
FROM (((customer cu
JOIN address a ON ((cu.address_id = a.address_id)))
JOIN city ON ((a.city_id = city.city_id)))
JOIN country ON ((city.country_id = country.country_id)))
)

Referenced Tables

Columns

NameTypeDefaultNullableChildrenParentsComment
idintegertrue
nametexttrue
addresstexttrue
zip codetexttrue
phonetexttrue
citytexttrue
countrytexttrue
notestexttrue
sidintegertrue

Relations

er