CREATE TABLE INVESTORS (Investor_details VARCHAR, investor_id VARCHAR)
CREATE TABLE TRANSACTIONS (investor_id VARCHAR, transaction_type_code VARCHAR)

Show the ids and details of the investors who have at least two transactions with type code 'SALE'.
SELECT T2.investor_id, T1.Investor_details FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id = T2.investor_id WHERE T2.transaction_type_code = "SALE" GROUP BY T2.investor_id HAVING COUNT(*) >= 2
SELECT "T2"."investor_id", "T1"."Investor_details" FROM "INVESTORS" AS "T1" JOIN "TRANSACTIONS" AS "T2" ON "SALE" = "T2"."transaction_type_code" AND "T1"."investor_id" = "T2"."investor_id" GROUP BY "T2"."investor_id" HAVING COUNT(*) >= 2