Created
April 28, 2012 04:30
-
-
Save michaeltwofish/2515912 to your computer and use it in GitHub Desktop.
Left join query
This file contains hidden or 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 *, count(client_tests.id) AS test_count FROM clients LEFT JOIN client_tests ON clients.id = client_tests.client_id GROUP BY clients.id; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment