SQL Left join...on..

  • 57
  • 0

當我下指令
select  years, casecnt
from tablename
where CompanyName = 'A公司'
and Years between 2015 and 2019

結果是
years | casecnt
2018  | 3
2016  | 4
2015  | 7

但我希望能顯示結果如下

years | casecnt
2019  | 0
2018  | 3
2017  | 0
2016  | 4
2015  | 7       

...繼續閱讀 »