title: Join two subquery in MySQL
body: <p>I am having problem in joint two subqueries in MySQL, e.g.</p>
  
  <pre><code>(select * from table1 where id = 1 group by f1) a1 
  join 
  (select * from table2 where id = 2 group by f2) a2 ON  a1.f3 = a2.f3;
  </code></pre>
  
  <blockquote>
    <p>ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'join (select * from table1 where id = 2)' at line 1</p>
  </blockquote>
  
  <p>Is my syntax incorrect?</p>