Your question is Rolling Average Robot Task Times. 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.
UiPath Automation Cloud stores execution telemetry for attended and unattended robots. Write a PostgreSQL query that reports the rolling average execution time for each robot across its current execution and two preceding completed executions.
robots with robot_task_executions and return the robot name, execution identifier, start time, and execution duration.status = 'completed' and a non-NULL execution duration.started_at and then execution_id to break timestamp ties.| Column | Type | Description |
|---|---|---|
| robot_idPK | INTEGER | Unique UiPath robot identifier |
| robot_name | VARCHAR(100) | UiPath robot display name |
| machine_name | VARCHAR(100) | Machine connected to the robot |
| Column | Type | Description |
|---|---|---|
| execution_idPK | INTEGER | Unique task execution identifier |
| robot_id | INTEGER | Robot that ran the task |
| task_name | VARCHAR(150) | UiPath process or task name |
| started_at | TIMESTAMP | Execution start timestamp |
| execution_time_seconds | INTEGER | Execution duration in seconds |
| status | VARCHAR(20) | Execution state |