Created
September 8, 2016 06:36
-
-
Save dmitrybubyakin/dd12e5c71590dee489e8a6f78e8bbea1 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 tmp.* FROM ( | |
select _id as `certificate_id`,RegNumber, `Id` as `GUID`, ( select count(*) | |
from `certificatesupplement` cs | |
INNER JOIN `accreditedprogramm` ap on ap.certificatesupplement_id = cs._id | |
WHERE cs.certificate_id = ac._id ) as `Total` | |
from accreditationcertificate as ac) as tmp | |
where tmp.`Total` = 0 | |
ORDER BY `tmp`.`certificate_id` ASC |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment