Skip to content

Instantly share code, notes, and snippets.

@yamti
Created December 1, 2011 12:04
Show Gist options
  • Save yamti/1416225 to your computer and use it in GitHub Desktop.
Save yamti/1416225 to your computer and use it in GitHub Desktop.
Taxon Concept Relationships with taxon title and reltype
SELECT tr.id, rFrom.titleCache as rFrom, rTo.titleCache as rTO, type.titleCache FROM TaxonRelationship tr INNER JOIN TaxonBase rFrom ON tr.relatedfrom_id = rFrom.id INNER JOIN TaxonBase rTo ON tr.relatedto_id = rTo.id INNER JOIN DefinedTermBase type ON tr.type_id = type.id WHERE type.titleCache not like 'Congruent to'
ORDER BY tr.id DESC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment