I'd like to keep one table with all the raw data, and one smaller, summarized table. Whenever the raw table is appended to or modified, I want to run code that will summarize the raw table based on a unique key and keep the summarized data in the smaller table.

So is there an sql command to combine the select statemenet, with a GROUP BY command and to copy the results to a summarized table?