BNP Paribas Interview Question

python --> in for loop SQL with joins