My previous question: sql query results depend on attributes of other table
The answear above is correct, but it looks like querybuilder is not able to solve a syntax