I think you should have all rows selected based on your script because s contains all values from Letter column, not just those which match number 2's letter and then you check if current rows letter is in that list (it always is).
There are many ways to do what you want. Here is the method I would most likely use ( Data table subscripting
Names Default To Here(1);
dt = New Table("Untitled",
Add Rows(6),
New Column("Letter", Character, "Nominal", Set Values({"A", "A", "A", "B", "B", "B"})),
New Column("Number", Numeric, "Continuous", Format("Best", 12), Set Values([1, 2, 3, 4, 5, 6]))
);
num_rows = dt << Get Rows Where(:Number == 2);
show(num_rows);
letters_of_interest = dt[num_rows, "Letter"];
show(letters_of_interest);
dt << Select Where(Contains(letters_of_interest, :Letter));
You could also use << Select Where in combination with << Get Selected Rows (one exampleget values from select where )
-Jarmo