Closest Median Profit: SQL Approach

Medium statistics interview practice: Closest Median Profit: SQL Approach.

You need to find the two traders with the closest median profit per trade. Given `traders` (id, name) and `trades` (id, trader_id, profit). Which SQL approach correctly solves this?