Skip to content

Instantly share code, notes, and snippets.

@mjfreshyfresh
Created February 11, 2010 19:39
Show Gist options
  • Save mjfreshyfresh/301862 to your computer and use it in GitHub Desktop.
Save mjfreshyfresh/301862 to your computer and use it in GitHub Desktop.
mysql> select count(*) from users U join challenges C where C.level=10;
+----------+
| count(*) |
+----------+
| 7296 |
+----------+
1 row in set (0.01 sec)
mysql> select count(*) from users U inner join challenges C on U.challenge_id = C.id where C.level=10;
+----------+
| count(*) |
+----------+
| 61 |
+----------+
1 row in set (0.01 sec)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment