Write a query to identify the top 5% of clients by transaction volume over the last quarter.
Treat transaction volume as the number of transactions. Use the previous completed calendar quarter relative to the query execution date. Include only clients with at least one transaction during that quarter.
client_id, client_name, and transaction_volume.transaction_volume descending, then client_id ascending to break ties.| Column | Type | Description |
|---|---|---|
| client_idPK | INT | Unique client identifier |
| client_name | VARCHAR(100) | Client display name |
| status | VARCHAR(20) | Current client status |
| Column | Type | Description |
|---|---|---|
| transaction_idPK | INT | Unique transaction identifier |
| client_id | INT | Client associated with the transaction |
| transaction_date | DATE | Date on which the transaction occurred |
| amount | NUMERIC(12,2) | Illustrative transaction amount |