Questions

sql developer

+
0 Votes
Locked

sql developer

nitashagoud
i have 3 tables with key relations

create table dbo.sale
1,'anday',61,1000
2,'rachod',34,2000
5,'chris',24,3000
7,'corms',41,4000
8,'ross',57,5000
9,'joe',38,6000
/*************************/
create table dbo.client
4,'pizza','holland','f&b'
5,'domino','chicago','f&b'
7,'pizzacornar','newyork','f&b'
9,'papa johns','miching','f&b'
/****************************/
create table dbo.orders
10,'8/2/96',4,2,540
20,'1/30/99',4,8,1800
30,'7/14/95',9,1,460
40,'1/29/98',7,2,2400
50,'2/3/98',6,7,600
60,'3/2/98',6,7,720
70,'5/6/98',9,7,150
60,'3/2/98',6,7,720

and give the answers for this questions
Q 1. names of all saleperson who have an order with dominos
Q2. the names all saleperson who do not have any order with Dominos& papa johns
Q3. the names of sales person that have 2 or more orders worth $150
Q4. write sql trigger to insert rows into a table called higher
achiever (names,age)
when a sale person sales amount gooes abouve $500

Q5. write queries to delete any duplicate rows the orders table

Q6. names of the saleperson who have not made any sales or sales less
then $50 in each year

please answer for this question and explain it for each question.