Postgres - Subtraction of two queries
<p>I want to make a subtraction like this:</p>

<pre><code>SELECT 
    (SELECT ST_Y(ST_Centroid(ST_Collect(column1))) AS distance_km 
     FROM table1) - 
    (SELECT ST_Y(ST_Transform(column1,4326)) AS distance_km 
     FROM table1) AS Difference
</code></pre>

<p>But the <code>ST_Y(ST_Centroid(ST_Collect(column1)))</code> has only one row and <code>ST_Y(ST_Transform(column1,4326))</code> has multiple rows. I want to subtract the multiple rows by the column and see the results for each multiple row. With this query I get: </p>

<blockquote>
  <p>ERROR:  more than one row returned by a subquery used as an expression</p>
</blockquote>

<p>Any help?</p>