Ok, this will be vague but here goes. I know what a query is. It is based on a SELECT statement. However, in general when I want to perform a calculation based on a select statement and have that result become part of the table data, what is the general framework? Here is an example.
I have a table named industry. There are 6 fields. The schema is given below. I know how to query and get results and then take those results to text files or excel. In this case, am needing to perform custom aggregations. There are 22 areas in the database. Needing to aggregate based on 17 of the 22. I can figure out how to aggregate using a select statement. Making it become additional rows to the industry table is where I need guidance.
create table industry
(
year char(4),
qtr char(2),
area char(6),
industry char(3),
ownership char(2),
employment numeric(8,0)
);...