title: Better way to query and join multiple querysets other than using a forloop in django?
body: <p>I have a model Item:</p>
  
  <pre><code>Item:
   batch_no
  </code></pre>
  
  <p><code>batch_no</code> can be anything from <code>1</code> to <code>20</code>. And there are 1000s of items in the database.</p>
  
  <p>Now. I need to get first <code>4</code> elements of each batch_no.</p>
  
  <p>I know to do it by querying and appending using forloop.</p>
  
  <pre><code>batches = Item.objects.values('batch_no').exclude(batch_no__isnull=True).distinct()
  blist=[]
  for batch in batches:
      bitems= Item.objects.filter(batch_no=batch['batch_no'])[:4]
      blist.append(bitems)
  return blist
  </code></pre>
  
  <p>Is there a better way than this? To do in a single Query?</p>
  
  <p>I'm new to Django.</p>