Skip to content

Instantly share code, notes, and snippets.

@unnitallman
Created December 4, 2014 04:26
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 unnitallman/f6362f8d97eb87b4a060 to your computer and use it in GitHub Desktop.
Save unnitallman/f6362f8d97eb87b4a060 to your computer and use it in GitHub Desktop.
Randwick - 1 year - site wide - traffic graph
SELECT COUNT(DISTINCT user_id, user_type) as count, DATE( FROM_UNIXTIME(date)) as created_on FROM `beta_reports_user_session_types` WHERE `beta_reports_user_session_types`.`site_id` = 224 AND `beta_reports_user_session_types`.`project_id` IN (2788, 2804, 2797, 2816, 2800, 5060, 7397, 2822, 7611, 6445, 6617, 4217, 2808, 6731, 2813, 6744, 5046, 2792, 6953, 2809, 2805, 2823, 2799, 2810, 2827, 2795, 2794, 2791, 2825, 2819, 2821, 2824, 2978, 2798, 6619, 2811, 2787, 2801, 2807, 2989, 2826, 8019, 2786, 2814, 2790, 2818, 2820, 5690, 2806, 2796, 2793, 2803, 2789, 2785, 2815, 6298, 2817, 2802, 2812, 2828) AND (`beta_reports_user_session_types`.`date` BETWEEN 1387426750 AND 1417492931) GROUP BY created_on ORDER BY created_on
On demo server
| 110 | 2014-11-15 |
| 157 | 2014-11-16 |
+-------+------------+
332 rows in set (16.82 sec)
On Production server
| 170 | 2014-11-29 |
| 117 | 2014-11-30 |
| 147 | 2014-12-01 |
| 144 | 2014-12-02 |
+-------+------------+
348 rows in set (4.96 sec)
@i-arindam
Copy link

That is promising

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment