Skip to content

Instantly share code, notes, and snippets.

@hanafiah
Created March 14, 2014 11:47
Show Gist options
  • Save hanafiah/9546270 to your computer and use it in GitHub Desktop.
Save hanafiah/9546270 to your computer and use it in GitHub Desktop.
SELECT link_id,COUNT(*) FROM ltlinks_log WHERE MONTH(datalog) = '3' AND YEAR(datalog) = '2012' GROUP BY link_id;
/* 0 rows affected, 233 rows found. Duration for 1 query: 173.062 sec. */
SELECT link_id,COUNT(*) FROM ltlinks_log WHERE datalog BETWEEN '2012-03-01 00:00:00' AND '2012-04-01 00:00:00' GROUP BY link_id;
/* 0 rows affected, 233 rows found. Duration for 1 query: 174.328 sec. */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment