Can't get subquery to work

SELECT DISTINCT Sample_Name FROM samples; returns:
[ {“Sample_Name”: “AB-RTX82-T”}, {“Sample_Name”: “SP-CB76-B”} ]

SELECT S.*, r.Experiment_Name FROM runs r UNNEST Samples S WHERE S.Sample_Name IN (SELECT DISTINCT Sample_Name FROM samples); returns nothing.

SELECT S.*, r.Experiment_Name FROM runs r UNNEST Samples S WHERE S.Sample_Name IN [“AB-RTX82-T”, “SP-CB76-B”]; returns proper results.

What am I doing wrong?

Sub query returns array of objects and IN you are comparing values.
Please add RAW in subquery project values.

SELECT S.*, r.Experiment_Name 
FROM runs r UNNEST Samples S WHERE S.Sample_Name IN
 (SELECT DISTINCT RAW Sample_Name FROM samples)