I need help with a bit of SQL...
I have a table which shows the below:
season | ValueThisYear
AW17-1 | 100
AW17-2 | 205
AW18-1 | 199
AW18-2 | 300
I need to create a view based on similar columns which will give me the data as below. ie. ValueThisYear and ValueLastYear. where season is AW18-1 the value this year is 199 and the value Last year is taken from AW17-1 being 100.
I need the view result showing as below:
season | ValueThisYear | ValueLastYear
AW17-1 | 100 |
AW17-2 | 205 |
AW18-1 | 199 | 100
AW18-2 | 300 | 205
Thanks in advance