Company: Wells_Frago_10_jan
Difficulty: medium
Problem Description You are working with a database for a video processing service. Write a query to calculate the total execution time (in seconds) for each task across all of its associated processes. Schema tasks Table Column Name Data Type Constraints Description id INT PRIMARY KEY The unique ID of the task. hash VARCHAR(255) A unique hash identifier for the task. processes Table Column Name Data Type Constraints Description task_id INT FOREIGN KEY ( tasks.id ) The ID of the task associated with the process. start_dt VARCHAR(19) The start timestamp of the process. end_dt VARCHAR(19) The end timestamp of the process. Required Output Your query should return the following columns: hash - The unique hash identifier for a task. usage_time - The total execution time in seconds across all processes for the corresponding task. Ordering: Sort the results in descending order by the total usage_time . If there is a tie, sort by hash in ascending order. Constraints or Notes The target SQL dia