Where can I find some information about building a query like this:
select
SomeField1,
(select count(distinct SomeField2) from SomeTable where SomeCondition) as SomeField3
from
SomeTable2
where
SomeCondition2
using Django ORM? It's probably in the Django documentation somewhere but I can't find it.