303 views
1 votes
1 votes
employee(employee name,street,city)

works(employee name,company name,salary)

company(companyname , city)

manages(employee name,manager name)

select companyname from company Q where not exist((select city from company where companyname = MOTO except (select city from company S where Q.company name = S.company name))

 

i dont understand what the inner query actually returns

can someone explain and give a small example or a reference link or video link to understand

Please log in or register to answer this question.

Related questions

0 votes
0 votes
1 answer
3
rayhanrjt asked Jan 6, 2023
719 views
Write SQL command to find DepartmentID, EmployeeName from Employee table whose average salary is above 20000.
2 votes
2 votes
1 answer
4
Subhrangsu asked Jun 18, 2022
431 views
Write SQL query to show all employees hired on June 4,1984 (non-default format)emp(empno,ename,job,mgr,hiredate,sal,comm,deptno)