title: How to query more than two tables in Django?
body: <p>I want to make a big query with multiple tables. My model will be written below, in which there are 5 <code>ForeignKeys</code>, that is, I will touch on 5 tables.</p>
  
  <pre><code>  class Transaction(models.Model):
      id = models.BigIntegerField(blank=True, null=False, primary_key=True)
      currency = models.ForeignKey(Currency, null=True, on_delete=models.CASCADE)
      deal = models.ForeignKey(Deal, null=True, related_name='deal', on_delete=models.CASCADE)
      service_instance = models.ForeignKey(ServiceInstance, null=True, on_delete=models.CASCADE)
      payment_source = models.ForeignKey(PayerPaymentSource, null=True, on_delete=models.CASCADE)
      payment_date = models.DateTimeField(blank=True, null=True)
      amount = models.IntegerField(blank=True, null=True)
      status = models.CharField(max_length=255, blank=True, null=True)
      context = models.TextField(blank=True, null=True)
  </code></pre>
  
  <p>Also, <code>PayerPaymentSource</code> contains <code>ForeignKey</code>.And need will from it another request like <code>select_related()</code></p>
  
  <p>How to implement such a query?</p>