Preparing for your next Quant Interview?
Practice Here!
OpenQuant
All Questions
Next Question
Top Buyer and Seller
00:00:00
4/10
Data Wrangling
Parts
Part 1

Write a SQL query to find the trader who bought and sold the most META stock in the past 30 days. Allow for ties and return the answer ordered by total transactions in descending order.

You are given the following table called transactions_table

Column NameData Type
transaction_datedatetime
stock_symboltext
buyer_idbigint
seller_idbigint
transaction_idbigint
purchase_pricefloat

Here is an example of how the output should look:

trader_idtransactions
1234585