postgres create view as code example
Example 1: sql view postgresql
CREATE OR REPLACE view_name
AS
query
Example 2: postgres call view
SELECT * FROM viewname;
CREATE OR REPLACE view_name
AS
query
SELECT * FROM viewname;