Doubts
Doubts
1.Find the names of all employees in the database who live in the same cities and
on the
same streets as do their managers.
select p.employee-name
from employee p, employee r, manages m
where p.employee-name = m.employee-name and m.manager-name =
r.employee-name
and p.street = r.street and p.city = r.city
5.Display all the orders issued by the salesman 'Paul Adam' from the orders table.
SELECT *
FROM orders
WHERE salesman_id =
(SELECT salesman_id
FROM salesman
WHERE name = 'Paul Adam');
SELECT *
FROM salesman
WHERE salesman_id NOT IN (
SELECT a.salesman_idFROMcustomer a, customer b
WHERE a.salesman_id=b.salesman_idAND a.cust_name <> b.cust_name);