The second value val2 is a column. So the values in the IN list are the values in which val1 and val2 have to match. So val1 must equal input1, and val2 must equal input 2. Since the val1 and input1 are hardcoded to ‘magic’, then we can just treat this like a normal IN list, but with a limit of 100,000 rather than 1,000. –