Google interview question

sql, python, to find optimal solutions