Login to manage your account

Please enter a valid email address.
Forgot Password?
Please enter a valid password.
OR

Don't have an account yet? Sign up

What does the ORM's annotate() method do?

  1. A Adds a comment to the query
  2. B Adds a calculated value to each row of the QuerySet
  3. C Filters rows by a condition
  4. D Sorts the results
Answer

Adds a calculated value to each row of the QuerySet

annotate adds a per-object computed value such as a related count. aggregate returns a single summary value over the whole QuerySet instead.

All Django MCQs

Login to manage your account

Please enter a valid email address.
Forgot Password?
Please enter a valid password.
OR

Don't have an account yet? Sign up as