so I'm new to Oracle SQL and am trying to create a calculated column using a subquery. It seems like this information shouldn't be so hard to find but I haven't been able to find it... I would really appreciate any guidance!
SQL> CREATE VIEW booking_agent_view
2 AS
3 SELECT sf.flight_nbr, sf.flight_date, seats_available,
4 FROM sched_flight sf, aircraft_type at, aircraft_data ad, (SELECT count(cust_nbr) FROM reservation r GROUP BY flight_nbr, flight_date) seats_available
5 WHERE sf.aircraft_serial_nbr = at.aircraft_serial_nbr AND at.type=ad.type;
FROM sched_flight sf, aircraft_type at, aircraft_data ad, (SELECT count(cust_nbr) FROM reservation r GROUP BY flight_nbr, flight_date) AS seats_available
*
ERROR at line 4:
ORA-00936: missing expression
Thank you!