Created
March 18, 2014 16:20
-
-
Save Gizmokid2005/9623528 to your computer and use it in GitHub Desktop.
This file contains 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 | |
DISTINCT | |
patient_id | |
FROM | |
procedures as pr | |
join patients as pa on pa.patient_id = pr.patient_id | |
WHERE | |
pr.TimeOfService >= '01/01/2010' | |
AND NOT EXISTS (SELECT * FROM procedures AS pr2 WHERE pr2.patient_id = pr.patient_id AND pr.TimeOfService < '01/01/2010') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment