> 
> **Possible Duplicate:**  
> 
> [Insert data from to a table](https://stackoverflow.com/questions/2803839/insert-data-from-to-a-table) 
> 
> 
> 

From the main Tax table, I want to be able to do a computation and write the output into a new table. 

```
select zipcode, sum(A00100)/sum(N1) as 'avg_agi' from taxbyzip2008 group by zipcode;

```

The new table to be named avgagi will have two fields (columns), the zipcode and avg\_agi.

I know how to create a new table, but I don't know how to take the output from the above select and have it written to the new table avgagi and populate it with zipcode and avg\_agi. Thanks!