0

Need help for db query

how to do left join query with subquery in django "Select (sum(a.qty)-b.qty) as qty from a left join (select sum(b.qty) as qty from b group by b.id) on b.id = a.id group by a.id order by a.id. but problem is no foreign key

11th Apr 2020, 1:13 AM
MD ASHIQUR RAHMAN
MD ASHIQUR RAHMAN - avatar
1 Respuesta
+ 2
I think your query has syntax error. AFAIK a table name is expected after JOIN, but here you have a subquery instead.
12th Apr 2020, 11:18 AM
Ipang