我正在将对字段(使用percentile(,0.25 ..)函数)进行第25、50和75%百分位计算的配置单元查询转换为mysql查询,并停留在percentile函数上。我尝试使用percentile_rank()函数,但没有用。有人可以帮我弄这个吗?
Hive查询:
select percentile(cast((start_time-submit_time) as bigint), 0.25)/60000 as 25P_waittime from test_table
求解时引用的链接:
https://rpbouman.blogspot.com/2008/07/calculating-nth-percentile-in-mysql.html
https://popsql.com/learn-sql/mysql/how-to-calculate-percentiles-in-mysql