cancels per month

PHOTO EMBED

Tue Oct 26 2021 15:24:27 GMT+0000 (UTC)

Saved by @etanderson

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)
content_copyCOPY