How can I find the average time to purchase across all users?

Using the time_between function, you can calculate the time between one event and the other.

select avg(distance)/3600 as average_distance_in_hours
from
(select customer_user_id, 
time_between("install", "purchase") as distance
from cooladata
where date_range(context)
and filters(context) ) 


Add conditions to the first and second event will get you to measure the distance only on the user’s first session:
 
select avg(distance)/60 as average_distance_in_minutes
from
(select customer_user_id, 
time_between("USER_REGISTERED", "LOGGED_IN", is_new=1 ,is_new=1) as distance
from cooladata
where date_range(context)
and filters(context) ) 
Segentation
kpi
Behavioral