Solution Street Interview Question

Database query with JOIN, coding question