Your question is Case Study and SQL for Operational Data. Start with the requirements and the four tables on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Case study based and also sql based
Using the provided tables, identify accounts whose net contributions increased strictly from January through March 2025. Return only accounts that rank among the top two qualifying accounts within their investor segment.
account_id, investor_name, segment, january_net, february_net, march_net, funds_used, and segment_rank.segment, descending march_net, then account_id.| Column | Type | Description |
|---|---|---|
| investor_idPK | INT | Investor identifier |
| investor_name | VARCHAR(100) | Investor name |
| segment | VARCHAR(50) | Investor segment |
| Column | Type | Description |
|---|---|---|
| account_idPK | INT | Account identifier |
| investor_id | INT | Referenced investor |
| account_type | VARCHAR(40) | Account type |
| opened_date | DATE | Account opening date |
| Column | Type | Description |
|---|---|---|
| fund_idPK | INT | Fund identifier |
| fund_name | VARCHAR(100) | Fund name |
| asset_class | VARCHAR(40) | Fund asset class |
| Column | Type | Description |
|---|---|---|
| transaction_idPK | INT | Transaction identifier |
| account_id | INT | Referenced account |
| fund_id | INT | Referenced fund |
| transaction_date | DATE | Transaction date |
| transaction_type | VARCHAR(30) | Contribution or withdrawal |
| amount | DECIMAL(12,2) | Unsigned transaction amount |