title: High and Low Values sql
body: <p>I am trying to run a query to display the maximum and minimum values from a table called products according to a date from another table called pro_details.The query should display the most purchased products of that particular date as well as the least product purchased. However, the query does not show any record for a given month even when the actual date is exist! </p>
  
  <pre><code>SELECT 
      Prod.delivered, MIN(quality) Low, MAX(quality) High 
  FROM 
      pro_details prod, products pro
  WHERE 
      pro.ord = pro.ord
      AND Prod.delivered = TO_DATE('12-2015','mm-yyyy')
  GROUP BY  
      Prod.delivered
  ORDER BY  
      Prod.delivered DESC; 
  </code></pre>