title: Query to count values from different tables
body: <p>From a database composed of two tables, EMP and DEP, I need to list all locations (DEPT.LOC ),how many departments are in this location  and how many employees (EMP.EMPNO) are in this departments.</p>
  <p>Create a view listing all locations (Loc) along with the number of departments in that location and the number of employees employed in those departments.</p>
  <p>I wrote the below query but I get the error: missing expression.</p>
  <pre><code>SELECT D1.LOC, COUNT(D1.DEPTNO),COUNT(SELECT * FROM EMP E,DEPT D WHERE E.DEPTNO = D.DEPTNO AND  D.LOC = D1.LOC ) FROM DEPT D1 GROUP BY D1.LOC
  </code></pre>