Amazon Interview Question

Some general LPs and python + sql