Show the id and details of the investor that has the largest number of transactions.
CREATE TABLE TRANSACTIONS (investor_id VARCHAR); CREATE TABLE INVESTORS (Investor_details VARCHAR, investor_id VARCHAR)
SELECT TOP 1 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
<s>[INST] Write mssql query to answer the following question given the database schema. Schema: CREATE TABLE TRANSACTIONS (investor_id VARCHAR); CREATE TABLE INVESTORS (Investor_details VARCHAR, investor_id VARCHAR) Question: Show the id and details of the investor that has the largest number of transactions. [/INST] SELECT TOP 1 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 </s>