How many transactions are there with transaction type code "PUR"?
select count(*) from transactions where transaction_type_code = "PUR"
Show the number of transactions with transaction type code "SALE".
select count(*) from transactions where transaction_type_code = "SALE"
For these transactions, show the number made by each investor.
select investor_id, count(*) from transactions where transaction_type_code = "SALE" group by investor_id