Created
November 9, 2015 00:10
-
-
Save duan-li/3c2b6dd8700719adbde1 to your computer and use it in GitHub Desktop.
select query to find users trend from mysql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select count(id), join_datetime from customers | |
where status > 0 | |
group by DATE(join_datetime) | |
order by join_datetime desc | |
select count(id), join_datetime from customers | |
where status > 0 | |
group by MONTH(join_datetime) | |
order by join_datetime desc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment