本文介绍了Django中缺少“中位数”集合函数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Django的开发版本具有聚合函数,如Avg,Count,Max,Min,StdDev,Sum和Variance()。有没有理由中值从列表中缺少?

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?

实现一个似乎很容易。我错过了什么吗?总结功能在幕后执行多少?

Implementing one seems like it would be easy. Am I missing something? How much are the aggregate functions doing behind the scenes?

推荐答案

因为中位数不是SQL聚合。例如,参见和 MySQL聚合函数的列表。

Because median isn't a SQL aggregate. See, for example, the list of PostgreSQL aggregate functions and the list of MySQL aggregate functions.

这篇关于Django中缺少“中位数”集合函数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-14 02:09