Open adishwarsonapally1 opened 9 months ago
Is there any alternative query to find percentile?
Can I know the status of this feature?
Looks like this would increase compatibility with Oracle Database, PostgreSQL, MariaDB, SQL Server, Snowflake, etc. I haven't checked but that probably means this is in the ISO/IEC SQL Standards?
If someone wants to implement this then https://databaseblog.myname.nl/2023/08/tutorial-add-qrcode-function-to-tidb.html could be a start to learn how to implement functions in TiDB.
@dveeden Hi! Can I try it?
@dveeden Hi! Can I try it?
You want to try and implement PERCENTILE_CONT()
? Yes, please try. Feel free to ask any questions you might have either here on TiDB Community Slack.
This seems to help with compatibility with AWS Redshift, PostgreSQL, MariaDB, DB2, Vertica, Databricks, Oracle, SingleStore (memsql), MS SQL Server and more. However there seems to be significant differences in these implementations. However I haven't really seen conflicting implementations.
Hi @dveeden, can I work on this?
@harsh-vardhan-ande there is a draft PR ( #49895 ) from @akoshchiy that looks like it wasn't updated for a while. So I think it would be ok for you to work on this.
Bug Report
perncentile on a column is not working SELECT PERCENTILE_CONT(0.75) WITHIN GROUP (ORDER BY column_name) OVER () AS Q3 FROM YourTable; This is the query which is supported in both postgresql and mysql but it is throwing an error in TIDB
2. What did you expect to see? (Required)
result
3. What did you see instead (Required)
You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 2 column 41 near "(ORDER BY
_org_unit_id
) OVER () AS Q14. What is your TiDB version? (Required)
7.3.0