SELECT year(customer_operations.created) AS "year", date_format(customer_operations.created, '%M') AS "month", count(customer_operations.created) AS "cancels" FROM customer_actions INNER JOIN customer_operations ON customer_actions.operation_id=customer_operations.id WHERE customer_actions.action_type_id = 306 AND customer_operations.created >= '2020-10-01' GROUP BY year(customer_operations.created),month(customer_operations.created)