postgres create a table from query code example
Example: postgresql create table as select
CREATE TABLE films_recent AS
SELECT * FROM films WHERE date_prod >= '2002-01-01';
CREATE TABLE films_recent AS
SELECT * FROM films WHERE date_prod >= '2002-01-01';