SQL COUNT() statement not working -
i trying return total number of reserved seats in flightbooking table using flightid number.
select count(flight.flightid) reservedseats flightbooking status=r i error saying
error: missing from-clause entry table "flight" line 1: select count(flight.flightid) reservedseats flightbo...
what doing wrong?
try:
select count(flight.flightid) reservedseats flightbooking flight status='r' you referring flight.flightid there isn't table name or alias flight. engine doesn't know should retrieve flightid from. missing quotes around char value r.
in comment "i know nothing sql". appriciated if research before come here asking help.
Comments
Post a Comment