Create a table table using the following command:
CREATE TEMP TABLE temp_table_name ....
Once this is done, use the select query as shown below
select * from temp_table_name
The temporary table exists only for the duration of the session with which you created the table.
source
share