PlayStation Interview Question

3 sql queries and one python problem