I have the next queryset:
Article.objects.filter(finished=True, updated_at__range=[start, end]).extra(
select={'hour': 'extract(hour from updated_at)'}).values('hour').annotate(categorized=Count('id'))
And I get the error :
"ProgrammingError: column reference "updated_at" is ambiguous LINE 1: SELECT (extract(hour from updated_at)) AS "hour", COUNT("art..."
How should I go about this?
Edit: The queryset works without filtering by date "updated_at__range=[start, end]" but I need that filter.