UPDATE taxon_subnatl_dist tsd SET tsd.D_CURR_PRESENCE_ABSENCE_ID = 2, rec_last_mod_user = 'bt2385' where tsd.d_regularity_id = 2 and tsd.element_subnational_id in (select wled.data_id from working_list_element_data wled, working_list wl where wled.working_list_id = wl.working_list_id and wl.working_list_name = 'nac.birds_accidental_present'); select distinct tsd.element_subnational_id, count(tsd.taxon_subnatl_dist_id) from working_list_element_data wled, working_list wl, taxon_subnatl_dist tsd where wled.working_list_id = wl.working_list_id and wl.working_list_name = 'nac.birds_accidental_present' and tsd.element_subnational_id = wled.data_id group by tsd.element_subnational_id