I am trying to create a new column based on date I have written a code in the link SQL fiddle as I am looking for date automation on the column [SQL fiddle][1] here is a screenshot as I would like to get this similar and the data is based on the number of sold SKU. [![sscreenshot][2]][2] [1]: http://sqlfiddle.com/#!9/a6c585/1 [2]: https://i.sstatic.net/cxRBA.png