Consider the following table in Google Sheets:
| A B --+------- 1 | A 5 2 | B 3 3 | C 6 4 | D 0 5 | E 0 6 | F 7 7 | G 0 8 | H 2 9