I have a table A with below values
year quarter price source
2017 1 10 s
2017 3 12 t
2018 1 10 m
2018 2 15 r
I would like to see the table as below. Yes, I would like to fill the non specified quarters with previous quarter values.
I thought of creating a temp table B with all quarters and do a join with this table A but how can I fill the price and source fields from previous quarter.
year quarter price source
2017 1 10 s
2017 2 10 s
2017 3 12 t
2017 4 12 t
2018 1 10 m
2018 2 15 r