IBM interview question

SQL joins, coding in R