title: sql standard - using aggregate functions inside aggregate functions
body: <p>I've got 3 tables with different structures, which share the same logical column: <code>price</code>. I want to find the biggest price from all records from all 3 tables. I'm trying something like:</p>
  
  <pre><code>SELECT MAX(price) FROM (
  
  SELECT MAX(price) FROM pc
  UNION
  SELECT MAX(price) FROM printer
  UNION
  SELECT MAX(price) FROM laptop
  
  );
  </code></pre>
  
  <p>but I get an syntax error: <code>Incorrect syntax near ';'.</code>. What is wrong and how it should look like? This should be compatible to the SQL standard, not a particular RDBMS.</p>