I need to run a series of HIE SQL queries and store the result of each query into a temp table and use the temp table in subsequent query.
Example, Query1 produces a