Last active
November 12, 2018 17:06
-
-
Save meau/5ebfea615a18858ad08448095e08326f 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 | |
* | |
FROM | |
(SELECT | |
accession.id | |
FROM | |
accession) AS A | |
LEFT JOIN | |
(SELECT DISTINCT | |
accession.id | |
FROM | |
accession | |
JOIN linked_agents_rlshp ON linked_agents_rlshp.accession_id = accession.id | |
JOIN enumeration_value evrole ON linked_agents_rlshp.role_id = evrole.id | |
WHERE | |
evrole.value = 'source') AS B ON A.id = B.id | |
WHERE | |
B.id IS NULL | |
ORDER BY A.id DESC; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment