Write a SQL query to find the average time taken for each operational process in a given dataset.
Use the provided process and execution data. Calculate elapsed time only for completed executions with valid timestamps, while retaining processes with no qualifying executions.
process_id, process_name, and average_duration_seconds.NULL when a process has no qualifying executions.process_id ascending.| Column | Type | Description |
|---|---|---|
| process_idPK | INT | Unique identifier for the operational process |
| process_name | VARCHAR(100) | Name of the operational process |
| Column | Type | Description |
|---|---|---|
| execution_idPK | INT | Unique identifier for an execution |
| process_id | INT | Process associated with the execution |
| status | VARCHAR(20) | Execution status |
| started_at | TIMESTAMP | Execution start timestamp |
| completed_at | TIMESTAMP | Execution completion timestamp |