SAVE TO clause
The SAVE TO clause saves the data gathered by the SELECT into another table, instead of returning the result set. Use this option to copy part or all of a table into another table, or to save the result of a join or aggregate to another table. For example, the following statement averages student scores by grade and stores the result to another table:
SELECT GRADE, AVG(SCORE);
FROM STUDENTS ;
GROUP BY GRADE ;
SAVE TO SCORES