Untitled

SELECT DATE_FORMAT(date_column, '%Y-%m') AS month, SUM(CASE WHEN other_column = 'P' THEN 1 ELSE 0 END) AS rolling_volume FROM your_table_name GROUP BY DATE_FORMAT(date_column, '%Y-%m') ORDER BY DATE_FORMAT(date_column, '%Y-%m');
mail@pastecode.io avatar
unknown
plain_text
2 months ago
11 B
2
Indexable
Never
qwenrnrjjej
Leave a Comment