May 2020
Beginner
564 pages
14h 9m
English
There is only one small difference in Oracle when using the subquery in a FROM clause: you can't use the AS keyword with the alias for the subquery. Instead, the query will look as follows:
USE lahmansbaseballdb; SELECT ROUND(AVG(average_salary), 0) AS average_of_all_teams_salariesFROM (SELECT AVG(salary) average_salary FROM salaries GROUP BY teamid) team_salary;
The original query had AS between the code snippets GROUP BY teamid) and team_salary, like this:
GROUP BY teamid) AS team_salary;
Read now
Unlock full access