Which customer ids have filed complaints?
select distinct customer_id from complaints
What are the emails of these customers?
select distinct t1.email_address from customers as t1 join complaints as t2 on t1.customer_id = t2.customer_id
Sum the complaints of each customer email address.
select t1.email_address, count(*) from customers as t1 join complaints as t2 on t1.customer_id = t2.customer_id group by t1.customer_id
Find the email of the customer who has filed the most complaints.
select t1.email_address from customers as t1 join complaints as t2 on t1.customer_id = t2.customer_id group by t1.customer_id order by count(*) desc limit 1