How to calculate total time taken I want to calculate total driving time excluding time between Pause and Resume Driving using sql query.

Here is the sample data:

Create Table Tracker 
(LocationID int,
RequestID int,
TrackingDatetime datetime,
Status varchar(30));
go

Insert into Tracker
values
(1, 22, '2019-06-17 14:10:00', 'Stop'),
(2, 22, '2019-06-17 14:08:00', 'Driving'),
(3, 22, '2019-06-17 14:06:00', 'Driving'),
(4, 22, '2019-06-17 14:04:00', 'Resume'),
(5, 22, '2019-06-17 14:02:00', 'Pause'),
(6, 22, '2019-06-17 14:00:00', 'Driving'),
(7, 22, '2019-06-17 13:58:00', 'Driving'),
(8, 22, '2019-06-17 13:56:00', 'Start');


Grid view of sample data:
This is how you should have mention in the question:

Create Table Tracker 
(LocationID int,
RequestID int,
TrackingDatetime datetime,
Status varchar(30));
go

Insert into Tracker
values
(1, 22, '2019-06-17 14:10:00', 'Stop'),
(2, 22, '2019-06-17 14:08:00', 'Driving'),
(3, 22, '2019-06-17 14:06:00', 'Driving'),
(4, 22, '2019-06-17 14:04:00', 'Resume'),
(5, 22, '2019-06-17 14:02:00', 'Pause'),
(6, 22, '2019-06-17 14:00:00', 'Driving'),
(7, 22, '2019-06-17 13:58:00', 'Driving'),
(8, 22, '2019-06-17 13:56:00', 'Start');


Following query that you can start with for desired result (for test..):

WITH T as (
            select  LocationID,
                    RequestID,
                    TrackingDatetime,
                    CASE    WHEN Status = 'Resume' 
                            Then TrackingDatetime
                            Else LEAD(TrackingDatetime) OVER (PARTITION BY RequestID ORDER BY TrackingDatetime desc)
                    END as PrevTrackingTime,
                    Status,

                    ISNULL(DATEDIFF(minute,
                                (CASE   WHEN Status = 'Resume'  Then TrackingDatetime Else LEAD(TrackingDatetime) OVER (PARTITION BY RequestID ORDER BY TrackingDatetime desc) END), 
                                 TrackingDatetime
                            ), 0) as Duration_Minutes
            from Tracker
            )
select *, SUM (Duration_Minutes) over (order by TrackingDatetime) as Duration_Cumm
from T