Your question is Count Archive Center Documents by Status. Start with the requirements and the one table 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.
You are given a table from an OpenText Archive Center reporting extract. Write a basic SQL query to return the number of documents for each document_status, considering only rows where retention_years is greater than 0. Sort the result by the document count in descending order.
| Column | Type | Description |
|---|---|---|
| document_idPK | INT | Unique document identifier |
| repository_name | VARCHAR(100) | Archive repository name |
| document_status | VARCHAR(30) | Current document lifecycle status |
| retention_years | INT | Retention period in years |
| archived_date | DATE | Date the document was archived |