How many investors are there?
select count ( * ) from investors
How many investors have at least two transactions?
select count ( * ) from ( select t2.investor_id from investors as t1 join transactions as t2 on t1.investor_id = t2.investor_id group by t2.investor_id having count ( * ) > = 2 )
Show me their Ids.
select t2.investor_id from investors as t1 join transactions as t2 on t1.investor_id = t2.investor_id group by t2.investor_id having count ( * ) > = 2