Bug #93234 Support percentile_cont (SQL Standard) for median.
Submitted: 16 Nov 21:28 Modified: 17 Nov 6:46
Reporter: Meiji Kimura Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Optimizer Severity:S4 (Feature request)
Version: OS:Any
Assigned to: CPU Architecture:Any
Triage: Needs Triage: D5 (Feature request)

[16 Nov 21:28] Meiji Kimura
Description:
percentile_cont is a function defined in SQL Standard(SQL:2008).

# Please see Oracle 12c's manual in details.

https://docs.oracle.com/en/database/oracle/oracle-database/12.2/sqlrf/PERCENTILE_CONT.html...

As the document said, The MEDIAN function is a specific case of PERCENTILE_CONT where the percentile value defaults to 0.5.

FR for median, was requested in this bug. But if percentile_cont is supported, we can use percentile_cont for median.

Bug#14545

Please consider to support percentile_cont, and percentile_disc.

percentile_conf is supprted by major RDBMS as belows.

Oracle 9i
IBM Db2 11.1
MS SQL Server 2012
PostgreSQL 9.4
MariaDB 10.3.3

Firebird and MySQL are not supported that function.

How to repeat:
N/A

Suggested fix:
Support percentile_cont, percentile_disc in SQL:2008.
[16 Nov 21:45] Meiji Kimura
SQLite also doesn't support percentile_cont, but support median. See this link in details.

https://modern-sql.com/blog/2018-08/whats-new-in-mariadb-10.3#3.percentiles
[17 Nov 6:46] Umesh Shastry
Hello Meiji-San,

Thank you for the feature request!

regards,
Umesh