[Answer]-How to make that query with Django ORM?

1👍

messages = Message.objects.filter(thread__id__in=[1,2,3]).order_by('date')[:10]

using the in and order_by queryset methods, querying across a relationship in reverse, and slicing to limit the results

Leave a comment