SHOW CREATE VIEW

SHOW CREATE VIEW returns the SELECT statement used to create the view. This works on both materialized and non-materialized views.

Syntax 

SHOW CREATE VIEW view_name
Field Use
view_name The view you want to use. You can find available view names through SHOW VIEWS.

Examples 

SHOW CREATE VIEW my_view;
            View            |                                           Create View
----------------------------+--------------------------------------------------------------------------------------------------
 materialize.public.my_view | CREATE VIEW "materialize"."public"."my_view" AS SELECT * FROM "materialize"."public"."my_source"