how to calculate median on azure databricks delta table using sql
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2021 12:04 PM
how to calculate median on delta tables in azure databricks using sql ?
select col1, col2, col3, median(col5) from delta table group by col1, col2, col3
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2021 02:14 AM
try with the percentile function, as median = percentile 50:
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2021 05:46 AM
Thank you for youur comment. It worked.