I’ve been using SQL*PLus lately and one of my tasks was to display the EmpCode, EmpName and PostCode of all Employees who satisfy the following: Every Item they sell has a price value above the average of all stock items
EDIT:
Hi Mark, I have written something similar to what you have suggested, but I am aware that the answers produced are wrong.
select E.EmpCode, E.EmpName, PostCode
from Employees E
LEFT OUTER JOIN Stocks ST
where Price >
(select AVG(Quantity) from Stocks
where E.EmpCode = ST.Empcde;
Any help would be appreciated.
Try something like this
The syntax for a LEFT JOIN is
Also there’s a missing parenthesis at the end