title: Subquery in SQL Server Compact Edition
body: <p>I'm trying to do this in a SQL Server CE database, but the database engine keeps reporting errors. </p>
  
  <pre><code>SELECT  C.guid, C.name, C.updated, 
          C.hddsize, C.hddavailable, C.hddfree, 
          C.ramsize, C.profiles, C.cpu, 
          (SELECT COUNT(D.id) AS numprogs 
              FROM ComputerData AS D 
              WHERE D.computer_id = C.id) AS numprograms 
  FROM Computers AS C;
  </code></pre>
  
  <p>I've been told SQL Server CE supports subqueries. Is there something I'm doing wrong?</p>