If you had the following scenario, you could sort the reward desending,
sort the pickSeq ascending and use indices to solve for your problem:
q)n:10 q)people:(pickSeq:0+til n;person:`$"person",/:string 1+til
n;allowedToPick:n?01b) q)people pickSeq ...
If it's not an exact match, you could wrap the second column in
wildcards characters and use Like Each like' select from data where
childID like' ("*",'parentID,'"*") Note - this assumes that the parentID
has less characters than childID