Created
December 15, 2018 00:18
-
-
Save wykhuh/a61e7b28cdecd26e22ec1162ddf669e0 to your computer and use it in GitHub Desktop.
sql
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 | |
( | |
SELECT ARRAY_AGG(coalesce(ncbi_nodes.superkingdom, '--') || '|' || coalesce(ncbi_nodes.kingdom, '--')) | |
FROM ncbi_nodes | |
WHERE taxon_id in (SELECT ncbi_names.taxon_id from ncbi_names where lower(gbif_ct.class_name) = lower(ncbi_names.name)) | |
) AS ncbi_taxa | |
FROM combine_taxa as gbif_ct |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment