Created
October 26, 2017 08:15
-
-
Save shyuan/c8b883ee3bd0c33b096f8da8f5a20d84 to your computer and use it in GitHub Desktop.
Counting group by date with a UNIX timestamp column
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 FROM_UNIXTIME(`created_at`, '%Y.%m.%d') AS ndate, COUNT(1) AS xx_table_count FROM xx_table GROUP BY ndate; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment