title: SQL count and join statement
body: <p>I want to count unique BOOKING_NUMBERS, to display the total next to each STAFF_ID; I'm using the following statement:</p>
  
  <pre><code>SELECT c.Staff_Id , c.(COUNT Booking_Number) AS "Number of Lessons"
  FROM AM_Lessons c JOIN AM_Staff m
  ON (c.Staff_Id = m.Staff_Id)
  ORDER BY c.Staff_Id
  </code></pre>
  
  <p>I am getting the following error, despite all Column names and tables being correct</p>
  
  <blockquote>
    <p>ORA-01747: invalid user.table.column, table.column, or column specification</p>
  </blockquote>
  
  <p>What is the correct syntax?</p>