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
1 Réponse
+ 2
I think your query has syntax error. AFAIK a table name is expected after JOIN, but here you have a subquery instead.