title: How do we select data based on month and year in oracle query
body: <p>I have did my research and I found that it can be done in MSQL  with </p>
  
  <pre><code>SELECT * FROM sales WHERE month(sellDate) = 3 AND YEAR(sellDate) = 2017
  </code></pre>
  
  <p>But when I tried with Oracle , It returns me </p>
  
  <pre><code>ORA-00904: "YEAR": invalid identifier
  </code></pre>
  
  <p>Is there any Way I could call data based on month and year in oracle query ?</p>
  
  <p><strong>Solved</strong></p>
  
  <p><strong>Thank you so much , I have also came out with a solution</strong></p>
  
  <p>This is how I did it .. :)</p>
  
  <pre><code>select * from sales where to_char(sell,'MM')='09' AND to_char(sell,'YYYY')='2018';
  </code></pre>