FieldRoutes interview question

SQL query optimization