You are doing it right. In your case, you expect to filter the right side of the connection, so the date condition belongs to the connection. It says: "Give me all the branches, and only those income and expenses that correspond to my condition."
When you move your condition to the WHERE clause, you change the whole meaning of the request to "give me all the branches and their income and expenses, but only where everything corresponds to my condition."
This is not a matter of good practice, but by design, how your database will evaluate your queries.
source share