FunctionRacerProblemsRace

Salespeople Without Red Orders

MediumpandasPython

salespeople has columns id and name. companies has columns id and name. orders has columns sales_id and com_id. Return the names of salespeople who have no order with the company named "RED", in the order of salespeople. Salespeople with no orders at all are included.

Example 1

salespeople {"id":[1,2],"name":["Ann","Bo"]}
companies {"id":[7,8],"name":["RED","BLUE"]}
orders {"sales_id":[1,2],"com_id":[7,8]}
returns ["Bo"]

Ann sold to RED, Bo only to BLUE.

Constraints

Race itor take your time

Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.

More pandas problems