Supongo que desea encontrar la diferencia entre el tiempo de registro mínimo (donde tipo de control =1) y el tiempo de pago máximo (donde tipo de control =0)
select userID,
min_date,
max_date,
(max_date - min_date) diff
from (
select distinct userID,
(
select min(checktime)
from checkinout t2
where t1.userID = t2.userID
and t2.checktype = 1
) min_date,
(
select max(checktime)
from checkinout t3
where t1.userID = t3.userID
and t3.checktype = 0
) max_date
from checkinout t1
)
order by userID