I was trying to solve this question given below by using the subquery in MySQL but can't find a solution as it's showing subquery returns more than one row.
Problem Statement: Display the emp name with their salaries and their managers and managers
salary.
Display those only employees whose managers were hired after them.
select w.ename employee, w.SAL woSal, m.ename manager, m.SAL mSal
from emp w, emp m
where w.mgr = m.empno and
(SELECT E1.ENAME
FROM EMP E1, EMP E2
WHERE E1.MGR=E2.EMPNO and ( E1.hiredate<E2.hiredate));