[Solved] Need to create a query for monthly data [closed]


You can get dynamic records using current month, by the following query

SELECT * FROM table_name WHERE CREATED_DATE BETWEEN 
DATE_FORMAT(NOW(),'%Y-%m-20') - INTERVAL 1 MONTH 
AND DATE_FORMAT( NOW(),'%Y-%m-20')

Check the live result at the fiddle http://sqlfiddle.com/#!2/4668c/7

7

solved Need to create a query for monthly data [closed]