the team email is the email of the team 'captain', so you need to join the tables. Should be something like:
select person.name, person.email from team left join person on person.id = team.captain
If you want it for only the registered teams, then that's a slightly more advanced query.
the team email is the email of the team 'captain', so you need to join
the tables. Should be something like:
select person.name, person.email
from team
left join person on person.id = team.captain
If you want it for only the registered teams, then that's a slightly
more advanced query.