Created
April 29, 2016 15:24
-
-
Save darrellsilver/e5dfe8b46da7eb99e20a6f1b3b3f26b5 to your computer and use it in GitHub Desktop.
Current mentors w/o active agreements
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 c.id, c.email, c.first_name, c.last_name | |
FROM contacts c | |
WHERE c.contact_type = 'Current mentor' | |
AND NOT c.id IN ( | |
SELECT DISTINCT mentor_id | |
FROM agreements a | |
WHERE last_session is null | |
) | |
; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment