﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
34706	Aggregation on annotated field fails starting on Django 4.2.2, when the aggregation has the same name as the annotation	Lorenzo Peña	nobody	"This would be the minimum reproducible example:


{{{
from django.db import models
from django.db.models import F, Sum


class House(models.Model):

    price = models.IntegerField()


House.objects.annotate(total=F(""price"")).aggregate(total=Sum(""total""))

# ProgrammingError: column ""total"" does not exist
# SELECT SUM(""total"") AS ""total"" FROM ""app_house""
}}}

This works in Django 4.2.1.
"	Uncategorized	closed	Uncategorized	4.2	Normal	duplicate			Unreviewed	0	0	0	0	0	0
