Missing 'Median' Aggregate Function in Django?
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? Because median isn't a SQL aggregate. See, for example, the list of PostgreSQL aggregate functions and the list of MySQL aggregate functions . Mark Chackerian Here's your missing function. Pass it a queryset and the name of the column that you want to find the median for: def median_value