SQL query to compare product sales by month

后端 未结 6 1050
无人共我
无人共我 2021-02-10 07:52

I have a Monthly Status database view I need to build a report based on. The data in the view looks something like this:

Category | Revenue  |  Yearh  |  Month
B         


        
6条回答
  •  礼貌的吻别
    2021-02-10 08:13

    I could be wrong but shouldn't you be using a full outer join instead of just a left join? That way you will be getting 'empty' columns from both tables.

    http://en.wikipedia.org/wiki/Join_(SQL)#Full_outer_join

提交回复
热议问题