给定以下模型:
DAY_OF_WEEK_CHOICES = (
('monday', 'Monday'),
('tuesday', 'Tuesday'),
('wednesday', 'Wednesday'),
('thursday', 'Thursday'),
('friday', 'Friday'),
('saturday', 'Saturday'),
)
class EventForDay(models.Model):
event = models.ForeignKey(Event, db_index=True)
day_of_week = models.CharField(max_length=15, choices=DAY_OF_WEEK_CHOICES,
db_index=True)
day = models.DateField(db_index=True)
有没有一种简单的方法可以查询每个工作日发生的平均事件数?