Show the ids and details for statments.
select statement_id, statement_details from statements
For each of them, also show the number of accounts.
select t1.statement_id, t2.statement_details, count(*) from accounts as t1 join statements as t2 on t1.statement_id = t2.statement_id group by t1.statement_id
Sort the results in the descending order of the number of accounts.
select t1.statement_id, t2.statement_details from accounts as t1 join statements as t2 on t1.statement_id = t2.statement_id group by t1.statement_id order by count(*) desc
Show the id and details for the statment with the most accounts.
select t1.statement_id, t2.statement_details from accounts as t1 join statements as t2 on t1.statement_id = t2.statement_id group by t1.statement_id order by count(*) desc limit 1