SQL Error - #1241 - Operand should contain 1 column(s)
<pre><code>SELECT 
    k.*, 
    y.exchange,
        (
        SELECT 
            close AS close_20, 
            close_adj AS close_adj_20
            FROM stocks k
            WHERE 
                t = (
                    SELECT z.t
                    FROM usa_stocks_daily_bar z
                    WHERE 
                        t &lt; k.t     
                    ORDER BY z.t DESC
                    LIMIT 20                                    
                    )
                AND id = k.id
            LIMIT 1     
        )
FROM stocks k
JOIN symbols y
    ON k.id = y.id
WHERE   
    (
    y.exchange = 'NASDAQ CM' OR
    y.exchange = 'NASDAQ GM'
    )
    AND k.t BETWEEN 20150101 AND 20150110
ORDER BY t ASC
</code></pre>

<p>Getting the error #1241 - Operand should contain 1 column(s)</p>

<p>Trying to merge these two queries together, to get the close from 20 days ago, but cannot get this query to work.</p>

<p>As the query runs down the table stocks k, the date to get the close_adj and close changes from -20 days ago.</p>