Django ORM запросы
from django.contrib.auth.models import User из django.db import models
class CUser(User): score = models.IntegerField()
У пользовательского пользователя есть дополнительное поле ("score"), мы хотим выполнять следующие операции, используя только ORM-запросы. Каждый ответ должен содержать один запрос:
Calculate the mean score of all users.
Find the user with the highest score.
Find if there is any user with score less than 2 (return True/False)
Find all the users which have score exactly equal to the mean score (need to calculate mean score again in the same query).
Change the score value of all users in a single query to 100 (one hundred)
Find all the users which don't have score 10 or 20
Print a list of all the score values from all users excluding the first 10 users.