title: Show columns of current year and previous year in oracle
body: <p>I need to show in oracle customers rated by a particular grade for current year and previous year. E.g. the columns are Grade, Customers Rated with the particular grade for the current year,  Customers Rated with the particular grade for the previous year. The Grade should be as group and the customers should show total. If there are no customers then is should print 0.
  <a href="https://i.stack.imgur.com/XMGth.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XMGth.png" alt="enter image description here"></a></p>
  
  <p>The Above screenshot is the expected output. Until now I have only the Current Year Customers which are > 01/01/2016. I cannot create a query to bring also the Previous Year Customers.</p>
  
  <p>My current year for customers query is:</p>
  
  <p><code>SELECT Rating
  , count(customers) as Curr_year_Custs
  from Rated_Customers
  where Rated_year &gt; = '2016'
  group by Rating;</code></p>