Amazon Interview Question

Just some basic SQL questions. Group, Join