dunnhumby Interview Question

R, SQL basic questions.