query to find id with trait_name and coral_name corrected