I think the part using array in SQL query is not straight forward
where contract_name in ( {{contractsInput.values.toString()}} )
We use prepared statement by default so the whole contractsInput.values
will be passed in as a string. Here is a guide to do it in Retool
e.g. for PostgresQL:
SELECT
*
FROM
users
WHERE
id = ANY({{ [1, 2, 3] }})