/* This query returns EOs from a specific surveysite.
To change the surveysite name, move down to the WHERE clause */

SELECT
SCIENTIFIC_NAME.SCIENTIFIC_NAME Scientific_name,
EO_SURVEY_SITE.SURVEY_SITE_NAME Survey_site,
D_BASIC_EO_RANK.BASIC_EO_RANK_CD EO_rank,
EO.LAST_OBS_DATE Last_Obs,
EO.EO_RANK_COM Rank_comments,
EO.DIRECTIONS Directions,
EO.GEN_DESC Habitat,
EO.EO_ID

FROM
EO,
ELEMENT_SUBNATIONAL,
D_BASIC_EO_RANK,
SCIENTIFIC_NAME,
EO_SURVEY_SITE

WHERE


/* Change FISHERS ISLAND in the line starting with EO_SURVEY_SITE. to
reflect the surveysite you wish to query.
You do need to include the ' ' in the statement. The % is a wildcard
that will return all values starting with FISHERS ISLAND.
If you want an exact return, remove the % */

EO_SURVEY_SITE.SURVEY_SITE_NAME like 'FISHERS ISLAND%'and
EO.ELEMENT_SUBNATIONAL_ID= ELEMENT_SUBNATIONAL.ELEMENT_SUBNATIONAL_ID
and ELEMENT_SUBNATIONAL.SNAME_ID= SCIENTIFIC_NAME.SCIENTIFIC_NAME_ID
and EO_SURVEY_SITE.EO_ID = EO.EO_ID
and EO.D_BASIC_EO_RANK_ID = D_BASIC_EO_RANK.D_BASIC_EO_RANK_ID

/* Original query author: Troy Weldy, NY Natural Heritage Program
Created 6 October 2003
Last modified by Troy Weldy on 16 October 2003 */