面试题答案
一键面试SELECT
DATE_FORMAT(registration_date, '%Y-%m') AS month,
COUNT(user_id) AS new_users_count
FROM
users
GROUP BY
DATE_FORMAT(registration_date, '%Y-%m')
ORDER BY
month;
SELECT
DATE_FORMAT(registration_date, '%Y-%m') AS month,
COUNT(user_id) AS new_users_count
FROM
users
GROUP BY
DATE_FORMAT(registration_date, '%Y-%m')
ORDER BY
month;