title: Mysql query to get total current sales of each product by month
body: <p>It is my sql code i want to show the Total SUM of current-sales by month of each product, in this image we can see the Total result in october of pro_id =175, i want to show the entry of every month of each product, is there any loop for many products?  I will show the result in html table using php.</p>
  
  <pre><code>SELECT  MONTHNAME(`order_date`), SUM(`current-sales`) AS TotalCS,  `nsp`, `pro_id`
  FROM `orders` 
  WHERE YEAR(order_date) = 2017 AND MONTH(order_date) = 10
    AND pro_id = 175
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/53API.png" rel="nofollow noreferrer">Result by October</a></p>