Self join with Django ORM

I have a model: class Trades(models.Model): userid = models.PositiveIntegerField(null=True, db_index=True) positionid = models.PositiveIntegerField(db_index=True) tradeid = models.PositiveIntegerField(db_index=True) orderid = models.PositiveIntegerField(db_index=True) ... and I want to execute next query: select * from…

1 Comment