SQL Nested query on same table
<p>I need to select every space a company has where its area is bigger than average per company. Here's my query:</p>

<pre><code>SELECT *
FROM Space outer
WHERE area &gt;
( SELECT AVG (area)
FROM Space inner
WHERE outer.address = inner.address );
</code></pre>

<p>MySQL returns a syntax error starting at area>. I know I shouldn't have used address as primary key, and I can't use JOIN. It's just an assignment. Please, help</p>