Describe a time you used dbt or similar transformation tools to build a scalable data model.
For the hands-on portion, write a PostgreSQL transformation query that produces a reusable monthly usage model from the provided source tables. Include only completed events, preserve valid events with missing service records, and make the output suitable for downstream analytics.
Output
- One row per account, calendar month, and service.
- Return
account_id, account_name, usage_month, service_name, service_tier, completed_gpu_hours, completed_cost, and event_count.
- Sort by
account_id, usage_month, and service_name, with missing service names last.