SQL Query to fill missing gaps across time and get last non-null value
问题 I have the following table in my database: Month|Year | Value 1 |2013 | 100 4 |2013 | 101 8 |2013 | 102 2 |2014 | 103 4 |2014 | 104 How can I fill in "missing" rows from the data, so that if I query from 2013-03 through 2014-03, I would get: Month|Year | Value 3 |2013 | 100 4 |2013 | 101 5 |2013 | 101 6 |2013 | 101 7 |2013 | 101 8 |2013 | 102 9 |2013 | 102 10 |2013 | 102 11 |2013 | 102 12 |2013 | 102 1 |2014 | 102 2 |2014 | 103 3 |2014 | 103 As you can see I want to repeat the previous Value