Update queries to read the old version of the balances table.
Added case - explanations for each option.