Emerald Species

select  * from (select distinct id_site as site_code, scientific_name as species_name,species_code, id_eunis, species_group_name, scientific_name, null as common_name, code_2000,
null as lower_bound, null as upper_bound, null as counting_unit, null as abundance_category, null as population_type, null as appears_number_sites,
picture_url_new as picture_url,
null as E27_threat_code, null as E27_threat_name, null as EU_threat_code, null as EU_threat_name, null as WO_threat_code, null as WO_threat_name
from
(SELECT  ssld.*, si.*,
(select ThumbnailURL from [EUNIS].[latest].[species_photos] where main=1 and eunis_id=ssld.id_species ) picture_url_new
from EUNIS.latest.Species_Emerald ssld, EUNIS.latest.Species_Information si where si.code_2000=ssld.species_code) a) b

No data