MySQL Forums
Forum List  »  Analytics, Reporting, BI

Median & Percentile with MySQL? How can I get it?
Posted by: Stefan Maier
Date: July 20, 2017 01:55PM

Dear Forum,

I doing some reporting at our company and need some analytical window functions like median and percentile (actually percentile 0.5 is median) at my SQL queries. Both functions are available on Oracle databases for many years and I'm used of it.

A view months ago our company has decided to migrate from Oracle Databases to MySQL 5.7. I have to rewrite all my queries and I'm stuck on analytical window functions like median and percentile. They are not existing on MySQL which I was very surprised. So my question is: How can I get those functions?

For a short time I was very excited about hearing the build in window function support in MariaDB 10.2 and now the new MySQL 8.0.2 too and I was really hoping this will fix my issue. And indeed there are some nice functions and they are working fine but unfortunately neither median nor percentile are supported yet. :-( I hope they will be implemented in the future but that doesn't help me now (PERCENTILE_DISC to be specific).

Could you give me please some advice what I could do now? Currently I'm still working on Oracle for those kind of queries but that mixed database usage is complicated and a lot of hassle for me.

Best Regards,
Stefan

Options: ReplyQuote


Subject
Written By
Posted
Median & Percentile with MySQL? How can I get it?
July 20, 2017 01:55PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.