Your question is Querying Null Entries. Start with the requirements and the two 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.
First Trust Capital Management is reviewing client account data before producing advisor and regulatory reports. Write a PostgreSQL query that returns every account with one or more missing required values or without a matching advisor record.
LEFT JOIN so accounts are retained even when their advisor is missing.risk_profile or tax_status is NULL, or where the account has no matching advisor.account_id ascending.| Column | Type | Description |
|---|---|---|
| account_idPK | INT | Unique client account identifier |
| client_name | VARCHAR(100) | Client or household name |
| advisor_id | INT | Assigned advisor identifier |
| risk_profile | VARCHAR(30) | Investment risk classification |
| tax_status | VARCHAR(30) | Tax treatment of the account |
| opened_on | DATE | Account opening date |
| Column | Type | Description |
|---|---|---|
| advisor_idPK | INT | Unique advisor identifier |
| advisor_name | VARCHAR(100) | Advisor's full name |
| team_name | VARCHAR(80) | Advisor team |