The following query returns global rank factor, management, and characterization data, including the habitat fields with values comma-delimited. It is set up to return animal records. For plants, replace the animal cag fields with plant cag fields and modify the last line to select plant elcodes (beginning in P or N) or a list of plant names.
select scientific_name.scientific_name,
egt.g_primary_common_name,
egt.g_rank, egt.rounded_g_rank,
d_usesa.usesa_cd,
taxon_global.interpreted_usesa,
egr.g_rank_reasons,
egr.g_range_com,
egr.g_pop_size_com,
egr.g_number_eos_com,
egr.g_long_term_trend_com,
egr.g_short_term_trend_com,
egr.g_threat_com,
egr.g_other_rank_consid_com,
em.restoration_potential,
em.mgmt_sum,
em.mgmt_methods,
em.monitoring_methods,
em.mgmt_pgms_contacts,
em.mgmt_research_needs,
egr.g_element_desc,
ac.g_animal_general_desc,
ac.g_diagnostic_characteristics,
ac.g_reproduction_com,
ac.g_ecology_com,
ac.g_local_migrant_ind,
ac.g_distant_migrant_ind,
ac.g_habitat_com,
ac.g_food_habits_com,
ac.g_phenology_com,
ac.g_colonial_breeder_ind,
egr.version_date g_rank_fact_ed_date,
egr.version_author g_rank_fact_ed_auth,
em.version_date mgmt_info_ed_date,
em.version_author_name mgmt_info_ed_auth,
ac.version_date eco_lh_ed_date,
ac.version_author_name eco_lh_ed_auth,
DelimList('SELECT ref.formatted_full_citation FROM reference ref, element_global_ref' || ' WHERE
ref.reference_id = element_global_ref.reference_id AND element_global_ref.element_global_id =' || egt.element_global_id, ' * ') AS references,
DelimList('SELECT d_food_habits.food_habits_desc FROM d_food_habits, animal_cag_food_habits acfh' || ' WHERE
d_food_habits.d_food_habits_id = acfh.d_food_habits_id AND acfh.element_global_id =' || egt.element_global_id, ', ') AS food_habits,
DelimList('SELECT d_animal_phenology.animal_phenology_desc FROM d_animal_phenology, animal_cag_phenology acp' || ' WHERE
d_animal_phenology.d_animal_phenology_id = acp.d_animal_phenology_id AND acp.element_global_id =' || egt.element_global_id, ', ') AS phenology,
DelimList('SELECT dlh.lacustrine_habitat_desc FROM d_lacustrine_habitat dlh, animal_cag_lacus_hab aclh' || ' WHERE
dlh.d_lacustrine_habitat_id = aclh.d_lacustrine_habitat_id AND aclh.element_global_id =' || egt.element_global_id, ', ') AS lacus_hab,
DelimList('SELECT dph.palustrine_habitat_desc FROM d_palustrine_habitat dph, animal_cag_palus_hab acph' || ' WHERE
dph.d_palustrine_habitat_id = acph.d_palustrine_habitat_id AND acph.element_global_id =' || egt.element_global_id, ', ') AS palus_hab,
DelimList('SELECT drh.riverine_habitat_desc FROM d_riverine_habitat drh, animal_cag_riverine_hab acrh' || ' WHERE
drh.d_riverine_habitat_id = acrh.d_riverine_habitat_id AND acrh.element_global_id =' || egt.element_global_id, ', ') AS riverine_hab,
DelimList('SELECT dmh.marine_habitat_desc FROM d_marine_habitat dmh, animal_cag_marine_hab acmh' || ' WHERE
dmh.d_marine_habitat_id = acmh.d_marine_habitat_id AND acmh.element_global_id =' || egt.element_global_id, ', ') AS marine_hab,
DelimList('SELECT deh.estuarine_habitat_desc FROM d_estuarine_habitat deh, animal_cag_estuarine_hab aceh' || ' WHERE
deh.d_estuarine_habitat_id = aceh.d_estuarine_habitat_id AND aceh.element_global_id =' || egt.element_global_id, ', ') AS est_hab,
DelimList('SELECT dth.terrestrial_habitat_desc FROM d_terrestrial_habitat dth, animal_cag_terr_hab acth' || ' WHERE
dth.d_terrestrial_habitat_id = acth.d_terrestrial_habitat_id AND acth.element_global_id =' || egt.element_global_id, ', ') AS terr_hab,
DelimList('SELECT dsh.subterranean_habitat_desc FROM d_subterranean_habitat dsh, animal_cag_subterr_hab acsh' || ' WHERE
dsh.d_subterranean_habitat_id = acsh.d_subterranean_habitat_id AND acsh.element_global_id =' || egt.element_global_id, ', ') AS subterr_hab,
DelimList('SELECT dsf.special_hab_factor_desc FROM d_special_hab_factor dsf, animal_cag_spec_factor acsf' || ' WHERE
dsf.d_special_hab_factor_id = acsf.d_special_hab_factor_id AND acsf.element_global_id =' || egt.element_global_id, ', ') AS spec_hab_factor
from scientific_name, element_global egt, d_usesa, taxon_global, element_global_rank egr, element_management em, animal_cag ac
where egt.gname_id = scientific_name.scientific_name_id
and egt.element_global_id = egr.element_global_id (+)
and egt.element_global_id = em.element_global_id (+)
and egt.element_global_id = ac.element_global_id (+)
and egt.element_global_id = taxon_global.element_global_id
and taxon_global.d_usesa_id = d_usesa.d_usesa_id (+)
and (egt.elcode_bcd like 'A%' or egt.elcode_bcd like 'I%')
/*OR, if you want to select a specific set of records by name, replace the last line with a list such as this:*/
and upper(scientific_name.scientific_name) in ('ACCIPITER STRIATUS',
'ACIPENSER FULVESCENS',
'ACRIS CREPITANS BLANCHARDI',
'ACTITIS MACULARIA',
'AGKISTRODON PISCIVORUS LEUCOSTOMA',
'AIMOPHILA AESTIVALIS',
'ALASMIDONTA ATROPURPUREA',
'ALASMIDONTA MARGINATA',
'ALASMIDONTA VIRIDIS',
'ALOSA ALABAMAE',
'AMBLYOPSIS SPELAEA',
'AMBYSTOMA BARBOURI',
'AMBYSTOMA TALPOIDEUM',
'AMMOCRYPTA CLARA',
'AMMODRAMUS HENSLOWII',
'AMMODRAMUS LECONTEII',
'AMMODRAMUS SAVANNARUM',
'AMPHIUMA TRIDACTYLUM',
'ANAS ACUTA',
'ANAS CLYPEATA',
'ANAS DISCORS',
'ANAS RUBRIPES',
'ANEIDES AENEUS',
'ANODONTOIDES DENIGRATUS',
'APALONE MUTICA MUTICA',
'ARDEA ALBA',
'ARDEA HERODIAS',
'ASIO FLAMMEUS',
'ASIO OTUS',
'ASPIDOSCELIS SEXLINEATA',
'ATRACTOSTEUS SPATULA',
'BARTRAMIA LONGICAUDA',
'BONASA UMBELLUS',
'BOTAURUS LENTIGINOSUS',
'BUBULCUS IBIS',
'BUFO FOWLERI',
'CALIDRIS ALBA',
'CALIDRIS ALPINA',
'CALIDRIS MAURI',
'CALIDRIS PUSILLA',
'CAPRIMULGUS CAROLINENSIS',
'CAPRIMULGUS VOCIFERUS',
'CATHARUS FUSCESCENS',
'CEMOPHORA COCCINEA COPEI',
'CERTHIA AMERICANA',
'CHARADRIUS MELODUS',
'CHLIDONIAS NIGER',
'CHONDESTES GRAMMACUS',
'CHRYSEMYS DORSALIS',
'CIRCUS CYANEUS',
'CISTOTHORUS PLATENSIS',
'CLETHRIONOMYS GAPPERI MAURUS',
'CLONOPHIS KIRTLANDII',
'COCCYZUS ERYTHROPTHALMUS',
'COLINUS VIRGINIANUS',
'CONTOPUS VIRENS',
'CORVUS CORAX',
'CORVUS OSSIFRAGUS',
'CORYNORHINUS RAFINESQUII',
'CORYNORHINUS TOWNSENDII VIRGINIANUS',
'COTURNICOPS NOVEBORACENSIS',
'CROTALUS HORRIDUS',
'CRYPTOBRANCHUS ALLEGANIENSIS ALLEGANIENSIS',
'CUMBERLANDIA MONODONTA',
'CYGNUS BUCCINATOR',
'CYPRINELLA CAMURA',
'CYPRINELLA VENUSTA',
'CYPROGENIA STEGARIA',
'DENDROICA CAERULESCENS',
'DENDROICA CERULEA',
'DENDROICA DISCOLOR',
'DENDROICA FUSCA',
'DENDROICA PENSYLVANICA',
'DESMOGNATHUS FUSCUS',
'DESMOGNATHUS FUSCUS CONANTI',
'DESMOGNATHUS MONTICOLA',
'DESMOGNATHUS OCHROPHAEUS',
'DESMOGNATHUS WELTERI',
'DOLICHONYX ORYZIVORUS',
'EGRETTA CAERULEA',
'EGRETTA THULA',
'ELAPHE GUTTATA GUTTATA',
'ELLIPSARIA LINEOLATA',
'ELLIPTIO CRASSIDENS',
'EMPIDONAX MINIMUS',
'EMPIDONAX TRAILLII',
'EMPIDONAX VIRESCENS',
'EPIOBLASMA BREVIDENS',
'EPIOBLASMA CAPSAEFORMIS',
'EPIOBLASMA OBLIQUATA OBLIQUATA',
'EPIOBLASMA TORULOSA RANGIANA',
'EPIOBLASMA TRIQUETRA',
'ERIMYSTAX INSIGNIS',
'ERIMYZON SUCETTA',
'ESOX NIGER',
'ETHEOSTOMA BARRENENSE',
'ETHEOSTOMA CHIENENSE',
'ETHEOSTOMA CINEREUM',
'ETHEOSTOMA FUSIFORME',
'ETHEOSTOMA KANTUCKEENSE',
'ETHEOSTOMA LYNCEUM',
'ETHEOSTOMA MACULATUM',
'ETHEOSTOMA MICROLEPIDUM',
'ETHEOSTOMA PARVIPINNE',
'ETHEOSTOMA PERCNURUM',
'ETHEOSTOMA PROELIARE',
'ETHEOSTOMA PYRRHOGASTER',
'ETHEOSTOMA RAFINESQUEI',
'ETHEOSTOMA SAGITTA SAGITTA',
'ETHEOSTOMA SAGITTA SPILOTUM',
'ETHEOSTOMA SANGUIFLUUM',
'ETHEOSTOMA SUSANAE',
'ETHEOSTOMA SWAINI',
'ETHEOSTOMA TECUMSEHI',
'EUMECES ANTHRACINUS',
'EUMECES ANTHRACINUS ANTHRACINUS',
'EUMECES ANTHRACINUS PLUVIALIS',
'EUMECES INEXPECTATUS',
'EUPHAGUS CAROLINUS',
'EURYCEA GUTTOLINEATA',
'FALCO PEREGRINUS',
'FARANCIA ABACURA REINWARDTII',
'FULICA AMERICANA',
'FUNDULUS CHRYSOTUS',
'FUNDULUS DISPAR',
'FUSCONAIA SUBROTUNDA SUBROTUNDA',
'GALLINAGO GALLINAGO',
'GALLINULA CHLOROPUS',
'GRAPTEMYS KOHNII',
'GRAPTEMYS PSEUDOGEOGRAPHICA',
'GRUS AMERICANA',
'HALIAEETUS LEUCOCEPHALUS',
'HELMITHEROS VERMIVORUS',
'HEMIDACTYLIUM SCUTATUM',
'HYBOGNATHUS HAYI',
'HYBOGNATHUS PLACITUS',
'HYLA AVIVOCA',
'HYLA CINEREA',
'HYLA GRATIOSA',
'HYLA VERSICOLOR',
'HYLOCICHLA MUSTELINA',
'ICHTHYOMYZON CASTANEUS',
'ICHTHYOMYZON FOSSOR',
'ICHTHYOMYZON GREELEYI',
'ICTINIA MISSISSIPPIENSIS',
'ICTIOBUS NIGER',
'IXOBRYCHUS EXILIS',
'JUNCO HYEMALIS',
'KINOSTERNON SUBRUBRUM',
'KINOSTERNON SUBRUBRUM SUBRUBRUM',
'KINOSTERNON SUBRUBRUM HIPPOCREPIS',
'LAMPETRA APPENDIX',
'LAMPROPELTIS TRIANGULUM ELAPSOIDES',
'LAMPSILIS ABRUPTA',
'LAMPSILIS OVATA',
'LAMPSILIS TERES',
'LANIUS LUDOVICIANUS',
'LASMIGONA COMPRESSA',
'LASMIGONA SUBVIRIDIS',
'LEPOMIS MARGINATUS',
'LEPOMIS MINIATUS',
'LIMNODROMUS GRISEUS',
'LIMNODROMUS SCOLOPACEUS',
'LIMNOTHLYPIS SWAINSONII',
'LOPHODYTES CUCULLATUS',
'LOTA LOTA',
'MACROCHELYS TEMMINCKII',
'MASTICOPHIS FLAGELLUM FLAGELLUM',
'MEDIONIDUS CONRADICUS',
'MELANERPES ERYTHROCEPHALUS',
'MENIDIA BERYLLINA',
'MOXOSTOMA POECILURUM',
'MUSTELA NIVALIS',
'MYOTIS AUSTRORIPARIUS',
'MYOTIS GRISESCENS',
'MYOTIS LEIBII',
'MYOTIS SODALIS',
'NEOTOMA MAGISTER',
'NERODIA CYCLOPION',
'NERODIA ERYTHROGASTER NEGLECTA',
'NERODIA FASCIATA CONFLUENS',
'NERODIA RHOMBIFER RHOMBIFER',
'NOCOMIS BIGUTTATUS',
'NOTROPIS ALBIZONATUS',
'NOTROPIS HUDSONIUS',
'NOTROPIS MACULATUS',
'NOTROPIS SP. 4',
'NOTURUS EXILIS',
'NOTURUS HILDEBRANDI',
'NOTURUS PHAEUS',
'NOTURUS STIGMOSUS',
'NYCTANASSA VIOLACEA',
'NYCTICEIUS HUMERALIS',
'NYCTICORAX NYCTICORAX',
'OBOVARIA RETUSA',
'OBOVARIA SUBROTUNDA',
'OPHISAURUS ATTENUATUS LONGICAUDUS',
'OPORORNIS FORMOSUS',
'PANDION HALIAETUS',
'PASSERCULUS SANDWICHENSIS',
'PEGIAS FABULA',
'PELECANUS ERYTHRORHYNCHOS',
'PERCINA MACROCEPHALA',
'PERCINA SQUAMATA',
'PERCINA STICTOGASTER',
'PERCOPSIS OMISCOMAYCUS',
'PEROMYSCUS GOSSYPINUS',
'PHALAROPUS TRICOLOR',
'PHENACOBIUS URANOPS',
'PHEUCTICUS LUDOVICIANUS',
'PHOXINUS CUMBERLANDENSIS',
'PICOIDES BOREALIS',
'PIPILO ERYTHROPHTHALMUS',
'PITUOPHIS MELANOLEUCUS MELANOLEUCUS',
'PLATYGOBIO GRACILIS',
'PLETHOBASUS COOPERIANUS',
'PLETHOBASUS CYPHYUS',
'PLETHODON CINEREUS',
'PLETHODON KENTUCKI',
'PLETHODON VENTRALIS',
'PLETHODON WEHRLEI',
'PLEUROBEMA CLAVA',
'PLEUROBEMA OVIFORME',
'PLEUROBEMA PLENUM',
'PLEUROBEMA RUBRUM',
'PLUVIALIS DOMINICA',
'PODILYMBUS PODICEPS',
'POOECETES GRAMINEUS',
'POTAMILUS CAPAX',
'POTAMILUS PURPURATUS',
'PROTONOTARIA CITREA',
'PSEUDOTRITON MONTANUS DIASTICTUS',
'PSEUDOTRITON RUBER RUBER',
'PSEUDOTRITON RUBER VIOSCAI',
'PTYCHOBRANCHUS SUBTENTUM',
'QUADRULA CYLINDRICA CYLINDRICA',
'RALLUS ELEGANS',
'RANA AREOLATA CIRCULOSA',
'RANA PALUSTRIS',
'RANA PIPIENS',
'RANA SPHENOCEPHALA',
'RANA SYLVATICA',
'RHINICHTHYS CATARACTAE',
'RIPARIA RIPARIA',
'SCAPHIOPUS HOLBROOKII HOLBROOKII',
'SCAPHIRHYNCHUS ALBUS',
'SCOLOPAX MINOR',
'SEIURUS MOTACILLA',
'SIMPSONAIAS AMBIGUA',
'SIREN INTERMEDIA NETTINGI',
'SISTRURUS MILIARIUS STRECKERI',
'SITTA CANADENSIS',
'SOREX CINEREUS',
'SOREX DISPAR BLITCHI',
'SPHYRAPICUS VARIUS',
'SPILOGALE PUTORIUS',
'SPIZA AMERICANA',
'SPIZELLA PUSILLA',
'STERNA ANTILLARUM ATHALASSOS',
'STERNA HIRUNDO',
'TANTILLA CORONATA',
'THAMNOPHIS PROXIMUS PROXIMUS',
'THAMNOPHIS SAURITUS SAURITUS',
'THOBURNIA ATRIPINNIS',
'THRYOMANES BEWICKII',
'TOXOLASMA LIVIDUS',
'TOXOLASMA TEXASIENSIS',
'TRINGA FLAVIPES',
'TRINGA SOLITARIA',
'TRYNGITES SUBRUFICOLLIS',
'TYPHLICHTHYS SUBTERRANEUS',
'TYTO ALBA',
'UMBRA LIMI',
'URSUS AMERICANUS',
'VERMIVORA CHRYSOPTERA',
'VERMIVORA PINUS',
'VILLOSA FABALIS',
'VILLOSA LIENOSA',
'VILLOSA ORTMANNI',
'VILLOSA TRABALIS',
'VILLOSA VANUXEMENSIS',
'VIREO BELLII',
'VIRGINIA VALERIAE VALERIAE',
'WILSONIA CANADENSIS')
QUERY: Get ranking, habitat, and management fields Print
Modified on: Mon, 9 Apr, 2018 at 1:38 PM
Did you find it helpful? Yes No
Send feedbackSorry we couldn't be helpful. Help us improve this article with your feedback.