SQL query for Informix to get all the records from previous month
问题 I need a query which can generate the total no of records generated in the previous month. I started with this query: select state, taxing_entity, count(taxing_entity) Total_TRXN_Count from taxes where effect_date between '2016/07/01' and '2016/07/31' group by state, taxing_entity, effect_date But I need a query which can dynamically calculate the no of records for a previous month without hard coding the dates. I tried many queries like: SELECT * FROM taxes WHERE effect_date >= DATEADD(day,