Lennar Interview Question

A sql question and then a data frame manipulation question/.