SELECT date_format(FROM_UNIXTIME(sms.created_at), '%Y-%m'), count(*)
***
GROUP BY date_format(FROM_UNIXTIME(sms.created_at), '%Y-%m');
2021-01 3021
2021-02 11389
2021-03 11971
2021-04 24577
2021-05 16958
2021-06 21310
2021-07 21016
2021-08 5134
2021-01 | 2021-02
3021 | 11389