SQL Command not properly ended? SQL Command not properly ended? oracle oracle

SQL Command not properly ended?


oracle does not support as for table aliases, only for column aliases and they are optional for that use => delete all as keywords ;)


You shouldn't put the AS temp. When putting alias to a table (or subquery) you should only write the alias. This should work:

SELECT Temp.name, Temp.AvgSalary FROM ( SELECT A.aid, A.aname AS name, AVG(E.salary) AS AvgSalary        FROM Aircraft A, Certified C, Employees E)  Temp;

Best regards,