Google interview question

2 SQL Questions - Write SQL with join and sum and count