i want last 12 month + current month sale and my date format is string in mysql : select pd.DC_Date,sum(pd.Quantity-pd.Credit_Quantity) as 'Sales' from past_year_data pd
 inner join idash_tb2_product_list PL ON PD.Product_Name=PL.Product_Name
where pd.Branch_Name = 'Delhi' and DATE_FORMAT(STR_TO_DATE(DC_Date,'%m'), '%M')=DATE_FORMAT(STR_TO_DATE('7/31/2017', '%m'), '%M') 


This is what i m trying to do 