Amazon Interview Question

Write some SQL queries starting from the given tables, and then replicate the queries in Python language.