InfluxQL to FLUX - Percentile

Hello,

I’m trying to convert an InfluxQL query to FLUX but struggling with the Percentile, I know in FLUX the quantile() function is the equivalent but can’t translate it.

SELECT percentile("elapsed", 50) as "open", percentile("elapsed", 99) AS "99%" FROM "dataset" WHERE $timeFilter AND "name" = 'collect1' GROUP BY time(1h)

Thanks,
Rob!