-
Error encountered while calculating median using percentile_cont function
Hey, I’m currently dealing with a table named “masterdata” that has the following setup: user_eng_time, day, user_pseudo_id. Ran into a little issue when I tried running this code:
`
select percentile_cont(x,0.5) over () as median_time_in_seconds
from(
select round(user_eng_time/1000) from masterdata
) as x
`
But all I got was this pesky error:
`
No matching signature for aggregate function PERCENTILE_CONT for argument types: STRUCT, FLOAT64. Supported signatures: PERCENTILE_CONT(FLOAT64, FLOAT64); PERCENTILE_CONT(NUMERIC, NUMERIC); PERCENTILE_CONT(BIGNUMERIC, BIGNUMERIC) at [55:8]
`
Log in to reply.