Я хочу выполнить внутреннее соединение между таблицами, которые содержат внешний ключ другой таблицы в VIEW.PY
![enter image description here](https://i.stack.imgur.com/hB7HH.png)
![enter image description here](https://i.stack.imgur.com/ZPrKW.png)
![enter image description here](https://i.stack.imgur.com/xTJnC.png)
Необработанный запрос, который я пытаюсь сделать в django,
SELECT *
FROM table3 t3
inner join table2 t2 on t2.C=t3.E
where t2.B=0 and t2.D=t3.F and
( (t3.G =1234 and t3.H=0) or (t3.H!=0 and t3.G is null) )
как сделать это в django просмотров