Percentile function using time in Access

183 views Asked by At

I'm trying to calculate the 90th percentile of travel time for districts. I'm using MS Access.

SELECT DISTINCT District As District_Num, 
PERCENTILE_CONT(0.9) WITHIN GROUP (ORDER BY Travel_Time) OVER (PARTITION BY District) AS 90th_Percentile
FROM [Incidents-J];

I'm getting the error message:

"Syntax error (missing operator) in query expression 'PERCENTILE_CONT(0.9) WITHIN GROUP (ORDER BY Travel_Time) OVER (PARTITION BY District)'

Note, travel_time is in the format of h:mm:ss. Is this the issue? Is so, what would be a way of converting it into something useful (ex 0:01:20 into 80)?

0

There are 0 answers