A view is a named query stored in the database. A view does not store any data like a table does. Instead when a user queries a view, the underlying query is executed to obtain the result set.
Syntax to create a view in Postgres database:
create view viewname as (select statement );