Your question is SQL: Identify Trends Over Time. 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.
Huron Consulting Group needs a monthly view of engagement activity to identify periods with unusually high or low billable revenue. Write a PostgreSQL query using the engagement and work log data.
Above average, Below average, or At average based on its revenue compared with the average monthly revenue for the selected period.| Column | Type | Description |
|---|---|---|
| engagement_idPK | INT | Unique engagement identifier |
| client_name | VARCHAR(120) | Client or internal stakeholder name |
| service_line | VARCHAR(80) | Huron service line supporting the engagement |
| start_date | DATE | Engagement start date |
| status | VARCHAR(30) | Current engagement status |
| Column | Type | Description |
|---|---|---|
| log_idPK | INT | Unique work log identifier |
| engagement_id | INT | Engagement associated with the work log |
| work_date | DATE | Date on which work was performed |
| billable_hours | NUMERIC(8,2) | Number of billable hours recorded |
| hourly_rate | NUMERIC(10,2) | Billing rate applied to the work |
| log_status | VARCHAR(20) | Approval state of the work log |