Skip to content

Instantly share code, notes, and snippets.

@rf
Created February 4, 2014 19:09
Show Gist options
  • Save rf/8810221 to your computer and use it in GitHub Desktop.
Save rf/8810221 to your computer and use it in GitHub Desktop.
mysql> SELECT DATE(date) Date, COUNT(DISTINCT uuid) totalCOunt FROM analytics where date > now() - interval 1 month and date < now() GROUP BY DATE(date);
+------------+------------+
| Date | totalCOunt |
+------------+------------+
| 2014-01-04 | 1343 |
| 2014-01-05 | 2912 |
| 2014-01-06 | 3579 |
| 2014-01-07 | 3132 |
| 2014-01-08 | 3096 |
| 2014-01-09 | 3022 |
| 2014-01-10 | 2892 |
| 2014-01-11 | 2517 |
| 2014-01-12 | 2543 |
| 2014-01-13 | 3499 |
| 2014-01-14 | 3577 |
| 2014-01-15 | 3530 |
| 2014-01-16 | 3801 |
| 2014-01-17 | 4025 |
| 2014-01-18 | 3641 |
| 2014-01-19 | 5981 |
| 2014-01-20 | 11154 |
| 2014-01-21 | 15534 |
| 2014-01-22 | 15961 |
| 2014-01-23 | 16368 |
| 2014-01-24 | 12656 |
| 2014-01-25 | 7734 |
| 2014-01-26 | 8579 |
| 2014-01-27 | 16027 |
| 2014-01-28 | 15860 |
| 2014-01-29 | 14857 |
| 2014-01-30 | 14853 |
| 2014-01-31 | 11683 |
| 2014-02-01 | 6969 |
| 2014-02-02 | 7265 |
| 2014-02-03 | 11504 |
| 2014-02-04 | 10186 |
+------------+------------+
32 rows in set (21.88 sec)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment