Given an input and output table, explain the steps required to convert the input table into the output table using a SQL pivot, then write the SQL query.
Asked in the R3 stage. Use the provided input table and produce the requested output shape.
service_line and account_name.service_line, account_name, jan_volume, feb_volume, and mar_volume.NULL.service_line, then account_name ascending.| Column | Type | Description |
|---|---|---|
| input_idPK | INT | Unique input row identifier |
| service_line | VARCHAR(50) | Service line associated with the volume |
| account_name | VARCHAR(100) | Account associated with the volume |
| period | VARCHAR(10) | Reporting period |
| case_volume | INT | Number of cases recorded for the row |