FNZ interview question

SQL related question based on provided tables