Amazon Interview Question

2 SQL based questions basics on joins and where condition and Group By