Dear all,
I have to solve a problem if possible.
I have a lot of rows. The first column identifies the year of publication of a newspaper wilhe the other columns the number of access per year.
Year of publication Newspaper 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995
1985 Times 1 9 4 1 2 1 5 1 6 6 8
1985 Le Monde 2 0 3 4 1 1 1 4 2 2 2
1986 La Repubblica 0 1 3 6 1 1 4 4 6 5 2
1986 ...
1987 ...
1987 ...
I need to try a SQL code which allows me to sum the number of access in the following 5 years after the publication year.
For instance. For the first row, the program should sum from 1985 to 1989
While in the third row from 1986 to 1990
The problem is that I have 500000 rows with a lot of publications years, so I need to automatize the process
Thank you so much