Insertion of the calculated values and values into a new table. How?

Hi guys. Had a slight dilemma here. My problem is that:

1. I have an average of two values (in the same column) for the 2 different lines (which is 7 days before the event and the other which is 14 days). I need to insert a new table

WITH

2. the data in some of the other columns of the lines of these two values I have on average.

So, for example, I have the source table table S, with the values of Company_Name, Date, name of the Emp, salary, Date. I have to calculate the average salary, corresponding to the date criteria I described before. So I have to insert into another table (the average value) while keeping other data (Date, name of the Emp) etc.

This is really confusing me. I think that the mix of simple db and sql pl theory is to play with my head.

I know that the scenario is a bit confused, so please ask any questions! I'll check this thread very frequently!

Frankly speaking, I'm lost.

Please post some samples of entry and your required output in a formatted way.

Kind regards.

LOULOU.

Tags: Database

Similar Questions

Maybe you are looking for