sqlalchemy using INTERSECT and UNNEST
<p>I'm trying to translate a raw SQL to sqlalchemy core/orm but I'm having some difficulties. Here is the SQL:</p>

<pre><code>SELECT 
    (SELECT UNNEST(MyTable.my_array_column) 
     INTERSECT 
     SELECT UNNEST(ARRAY['VAL1', 'VAL2']::varchar[])) AS matched
FROM 
    MyTable
WHERE 
    my_array_column &amp;&amp; ARRAY['VAL1', 'VAL2']::varchar[];
</code></pre>

<p>The following query, gives me a <code>FROM</code> clause which I don't need in my nested <code>SELECT</code>:</p>

<pre><code>matched = select([func.unnest(MyTable.my_array_column)]).intersect(select([func.unnest('VAL1', 'VAL2')]))

# SELECT unnest(MyTable.my_array_colum) AS unnest_1 
# FROM MyTable INTERSECT SELECT unnest(%(unnest_3)s, %(unnest_4)s) AS unnest_2
</code></pre>

<p>How can I tell the <code>select</code> to not include the <code>FROM</code> clause? Note that <code>func.unnest()</code> only accepts a column. So I cannot use <code>func.unnest('my_array_column')</code>.</p>