How many investors are there?
select count(*) from investors
How many of them have transactions?
select count(distinct t1.investor_id) from investors as t1 join transactions as t2 on t1.investor_id = t2.investor_id
Could you order these investors according to their number of transactions in decreasing order?
select * from investors as t1 join transactions as t2 on t1.investor_id = t2.investor_id group by t2.investor_id order by count(*) desc
Show the id and details of the first investor.
select t2.investor_id, t1.investor_details from investors as t1 join transactions as t2 on t1.investor_id = t2.investor_id group by t2.investor_id order by count(*) desc limit 1