how to calculate median on azure databricks delta table using sql
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
- 5471 Views
- 2 replies
- 1 kudos
Latest Reply
try with the percentile function, as median = percentile 50: https://spark.apache.org/docs/latest/api/sql/#percentile
- 1 kudos