Skip to content

Instantly share code, notes, and snippets.

@phnessu4
Last active December 17, 2015 12:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phnessu4/5610294 to your computer and use it in GitHub Desktop.
Save phnessu4/5610294 to your computer and use it in GitHub Desktop.
mysql
#select data group by day 按天统计数据
select count(id),DATE_FORMAT(time,'%Y-%m-%d') from user where TO_DAYS(NOW()) - TO_DAYS(time)<=100 group by DATE_FORMAT(time,'%Y-%m-%d') order by time desc;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment