Missing 'Median' Aggregate Function in Django?

前端 未结 6 1068
孤城傲影
孤城傲影 2021-01-04 13:09

The Development version of Django has aggregate functions like Avg, Count, Max, Min, StdDev, Sum, and Variance (link text). Is there a reason Median is missing from the list

6条回答
  •  余生分开走
    2021-01-04 13:28

    A strong possibility is that median is not part of standard SQL.

    Also, it requires a sort, making it quite expensive to compute.

提交回复
热议问题