SQL COUNT() statement not working : <p>I am trying to return the total number of reserved seats in my flightbooking table using a flightID number.</p>

<pre><code>SELECT COUNT(flight.flightid) AS reservedseats FROM flightbooking
WHERE status=R
</code></pre>

<p>I get an error saying</p>

<blockquote>
  <p>ERROR:  missing FROM-clause entry for table "flight"
  LINE 1: SELECT COUNT(flight.flightid) AS reservedseats FROM flightbo...</p>
</blockquote>

<p>What am i doing wrong?</p>
