I am trying to write a SQL query to calculate actual work time for help desk tickets. This should only calculate the time from the ticket Opened time to Resolved time. The clock stops when the ticket reaches "Resolved" status.
Exclude if a ticket is in "Pending" status.
Exclude if a ticket is assigned to "Vendor Support".
Attached, please find sample data
Any assistance is greatly appreciated