Given a scenario, write an SQL query to retrieve customers with age between 20 and 30 and salary greater than a specific amount, so that an insurance campaign can be sent to them.
Asked in the 1st Round Technical Interview stage.
Use the customers and customer_financial_profiles tables. Apply a salary threshold of 75000.
customer_id, customer_name, age, and salary.age ascending, salary descending, then customer_id ascending.| Column | Type | Description |
|---|---|---|
| customer_idPK | INT | Unique customer identifier |
| customer_name | VARCHAR(100) | Customer's full name |
| age | INT | Customer age in years |
| VARCHAR(150) | Customer email address |
| Column | Type | Description |
|---|---|---|
| profile_idPK | INT | Unique financial profile identifier |
| customer_id | INT | Referenced customer identifier |
| salary | NUMERIC(12,2) | Annual customer salary |
| employment_status | VARCHAR(30) | Current employment status |