It should be A. As in B we are doing a join between two massive table whereas in A we are doing join between relatively smaller table and larger one and the output that this inner table gives (which is smaller in comparison to joins that we are doing in B) is used for join with depositer table with the selection condition.
Options C and D are invalid as there is no b-city column in a-Schema.
Lets see in detail. Let there be 100 different branches. Say about $10$% of accounts are below $0$. Also, let there be $10,000$ accounts in a branch amounting to $1,000,000$ total accounts. A customer can have multiple accounts, so let there be on average $2$ accounts per customer. So, this amounts to $2,000,000$ total entries in depositor table. Lets assume these assumptions are true for all the branches. So, now lets evaluate options A and B.
1. All the accounts in Agra branch, filter by positive balance, and then depositor details of them. So,
- Get branch name from branch table after processing $100$ records
- Filter $10,000$ accounts after processing $1,000,000$ accounts belonging to Agra
- Filter 1000 accounts after processing 10,000 accounts for positive balance
- Get $500$ depositor details after processing $2,000,000$ entries for the given $1000$ accounts (assuming $1$ customer having $2$ accounts). So, totally this amounts to $2,000,000,000$ record processing.
- So totally $\approx$ 2 billion records needs processing.
2. All the positive balance accounts are found first, and then those in Agra are found.
- Filter $100,000$ accounts after processing $1,000,000$ accounts having positive balance
- Find the deposito details of these accounts. So, $100,000 $*$ 2,000,000$ records need processing and this is a much larger value than for query A. Even if we reduce the percentage of positive balance ($10$ we assumed) the record processing of query A will also get reduced by same rate. So, overall query A is much better than query B.