mysql - SQL group by months, display empty months -
i got sql fiddle minimal data. database contains on 1000 output columns query couldnt load sqlfiddle.
i display months years found. in example car 1 sold in 2003 , display empty months 2003.
for car 2 sold in 2003 , 2004. display empty months 03 , 04.
i have read lot of similar questions , think simple join month table should trick. dont know how joins properly. me out on one?
sql fiddle here: http://sqlfiddle.com/#!9/14b2f5/3
also real query in mysql workbench , output this. can see feb. 2003 missing there. display "1952 alpine renault 1300" - "0" - "february 2003" instead of nothing now.
Comments
Post a Comment