title: Subquery using Excel's Microsoft Query
body: <p>I am trying to write a simple sub query that counts the number of unique alarm ID in a resultset after joining 2 tables. i.e</p>
  
  <pre><code>SELECT COUNT(DISTINCT ALARMTABLE.ID) FROM
   (SELECT ALARMTABLE.ID FROM ALARMTABLE) AS AA
  JOIN
   (SELECT ALARMDESCRIPTIONTABLE.DESCRIPTION FROM ALARMDESCRIPTIONTABLE) AS BB
  ON AA.ID=BB.ID
  </code></pre>
  
  <p>Both these tables have an id column that relates the id in one table with the description in the other. The idea being i can get a count and description for each alarm. e.g.</p>
  
  <pre><code>AlarmDescription     Alarm COUNT
  -----------------------------------
  Fire Alm                 1000
  Flood Alm                12
  Tornado Alm              75
  </code></pre>
  
  <p>When i run this using Microsoft query all i get is the error can't add table '('. What am i doing wrong?</p>