Thanks for posting your question in the Microsoft Q&A forum.
If you're looking for similar functionality, you might consider using SQL Server's built-in tools, such as PERCENTILE_CONT or PERCENTILE_DISC functions, which allow you to calculate percentiles directly within SQL queries:
** Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful **