Write a SQL query to find the second-highest credit limit within a specific customer segment.
Use the customers and credit_accounts tables and filter for the Prime segment. Treat the second-highest value as the second distinct credit limit, and include all customers tied at that value.
customer_id, customer_name, and credit_limit.credit_limit descending, then customer_id ascending.| Column | Type | Description |
|---|---|---|
| customer_idPK | INT | Unique customer identifier |
| customer_name | VARCHAR(100) | Customer full name |
| segment | VARCHAR(30) | Customer segment |
| Column | Type | Description |
|---|---|---|
| account_idPK | INT | Unique credit account identifier |
| customer_id | INT | Customer associated with the account |
| account_type | VARCHAR(40) | Type of credit account |
| credit_limit | DECIMAL(12,2) | Approved credit limit |