Order Database
Order Database
select s.salesman_id,s.name,count(customer_id)
from salesman s, customer c
where s.salesman_id = c.salesman_id
group by (s.salesman_id,s.name)
having count(customer_id)>1;
3. List all the salesman and indicate those who have and don’t
have customers in their cities (Use UNION operation.)
select name,ord_date
from highest_order h
where purchase_amt =
(select max(purchase_amt)
from highest_order
where h.ord_date = ord_date);
• Demonstrate the DELETE operation by
removing salesman with id 1000. All his orders
must also be deleted.
• delete from salesman where salesman_id =3;