# Django queryset chain annotate and distinct together

**URL:** <https://forum.djangoproject.com/t/django-queryset-chain-annotate-and-distinct-together/8717>\
**Category:** Using Django\
**Created:** [July 9, 2021, 5:42pm UTC](https://forum.djangoproject.com/t/django-queryset-chain-annotate-and-distinct-together/8717 "2021-07-09T17:42:26Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![KenWhitesell](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/kenwhitesell/32/280_2.png) [@KenWhitesell](https://forum.djangoproject.com/u/KenWhitesell)\
**Post date:** [July 9, 2021, 7:53pm UTC](https://forum.djangoproject.com/t/django-queryset-chain-annotate-and-distinct-together/8717/3 "2021-07-09T19:53:50Z")

</div>

Sorry, misinterpreted the original objective of the query.

To make sure I’m straight - you want the 30 most expensive toys, but if the same owner appears in that list, they aren’t included.

So, if you have the situation with the following rows in toys, and assuming you’re only looking for 3 entries instead of 30:

```auto
Owner Price
Joe $100
Jane $70
Jane $50
Fred $40
Mary $20

```

The list you’re looking for would look like this:

```auto
Owner Price
Joe $100
Jane $70
Fred $40

```

So if the top 100 priced items are all owned by the same person, the second item on the list would be the 101st-most expensive item.

Is this the correct interpretation?

---

_[View the full topic](https://forum.djangoproject.com/t/django-queryset-chain-annotate-and-distinct-together/8717)._
