Solution Street interview question

Database query with JOIN, coding question