title: Django ORM remove unwanted Group by when annotate multiple aggregate columns
body: <p>I want to create a query something like this in django ORM.</p>
  <pre><code>SELECT COUNT(CASE WHEN myCondition THEN 1 ELSE NULL end) as numyear
  FROM myTable
  </code></pre>
  <p>Following is the djang ORM query i have written</p>
  <pre><code>year_case = Case(When(added_on__year = today.year, then=1), output_field=IntegerField())
  
  qs = (ProfaneContent.objects
                      .annotate(numyear=Count(year_case))
                      .values('numyear'))
  </code></pre>
  <p>This is the query which is generated by django orm.</p>
  <pre><code>SELECT COUNT(CASE WHEN &quot;analyzer_profanecontent&quot;.&quot;added_on&quot; BETWEEN 2020-01-01 00:00:00+00:00 AND 2020-12-31 23:59:59.999999+00:00 THEN 1 ELSE NULL END) AS &quot;numyear&quot; FROM &quot;analyzer_profanecontent&quot; GROUP BY &quot;analyzer_profanecontent&quot;.&quot;id&quot;
  </code></pre>
  <p>All other things are good, but django places a <strong>GROUP BY</strong> at the end leading to multiple rows and incorrect answer. I don't want that at all. Right now there is just one column but i will place more such columns.</p>
  <p><strong>EDIT BASED ON COMMENTS</strong>
  I will be using the qs variable to get values of how my classifications have been made in the current year, month, week.</p>
  <p><strong>UPDATE</strong>
  On the basis of comments and answers i am getting here let me clarify. I want to do this at the database end only (obviously using Django ORM and not RAW SQL). Its a simple sql query. Doing anything at Python's end will be inefficient since the data can be too large. Thats why i want the database to get me the sum of records based on the CASE condition.
  I will be adding more such columns in the future so something like len() or .count will not work.</p>
  <p>I just want to create the above mentioned query using Django ORM (without an automatically appended GROUP BY).</p>