Created
April 29, 2016 15:24
-
-
Save darrellsilver/e5dfe8b46da7eb99e20a6f1b3b3f26b5 to your computer and use it in GitHub Desktop.
Revisions
-
Darrell Silver renamed this gist
Apr 29, 2016 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
Darrell Silver created this gist
Apr 29, 2016 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,9 @@ 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 ) ;