SELECT
count(*),
DATE_FORMAT(order_info.create_time, '%Y-%m-%d') AS count_by_date
FROM
order_info
WHERE
DATE_FORMAT(order_info.create_time, '%Y') = '2017'
GROUP BY
count_by_date
ORDER BY NULL
SELECT
count(*),
DATE_FORMAT(order_info.create_time, '%Y-%m-%d') AS count_by_date
FROM
order_info
WHERE
DATE_FORMAT(order_info.create_time, '%Y-%m') = '2017-04'
GROUP BY
count_by_date
ORDER BY NULL