Notes![what is notes.io? What is notes.io?](/theme/images/whatisnotesio.png)
![]() ![]() Notes - notes.io |
-- write a sql query to find all the orders generated by city paris, customer id and order number.
-- write sql query to find all the customer id and salesman ,who work with a particular customer with city name as well.
-- write a query to determine the commission of the salesman with order number and purchase amount.
-- write a sql query to find the details of the salesman who recieve max commision having purchase amount> "x".
-- write a query to find salesman who have more than one customer.
-- write a query to add column product in table salesman.
-- write a query to join both the tables using left join
-- to find purchase amount and order number W.R.T a particular order date
-- arrange the table w.r.t. increasing order date
______________________________________________________________________________________________________________________________________________
create table Salesman(Salesman_ID Varchar(10) , name varchar(25), city VARCHAR(25), comission int, primary key(Salesman_ID));
_______________________________________________________________________________________________________________________________________________
CREATE TABLE Orders (
Order_no int,
purchase_amt int ,
order_date date,
salesman_ID varchar(10)
);
____________________________________________________________________________________________________________________________________
insert into Salesman
values("AD14232","Mukesh","New Delhi",15000);
insert into Salesman
values("JV79468","Jayant","Ranchi",12000);
insert into Salesman
values("OD21390","Kashish","Jaipur",17000);
insert into Salesman
values("UP29301","Kamlesh","Jaipur",20000);
insert into Salesman
values("MN56810","Upadhy","Kochi",18000);
insert into Salesman
values("LK78660","Amit","Haryana",21000);
insert into Salesman
values("SK05436","Abdul","Kashmir",30000);
insert into Salesman
values("AL37460","Suresh","Bangalore",31500);
_______________________________________________________________________________________________________________________________________
insert into Orders
values(643782,40000,"2002-12-25","AL37460");
insert into Orders
values(524102,35000,"2003-05-22","LK78660");
insert into Orders
values(285735,28000,"2003-07-27","OD21390");
insert into Orders
values(360845,45000,"2004-08-30","JV79468");
####write more entries kyunki copy nhi ho rha baaki ka....####
#### also add another column "customer_ID".. maine dhyaan nhi diya tha nd wo skip ho gya####
____________________________________________________________________________________________________________________________________
#1 (online compiler doesn't support keys so we hv used "join" )
SELECT Orders.Order_no, Orders.order_date,Orders.customer_ID
FROM Orders
JOIN Salesman ON Salesman.Salesman_ID= Orders.salesman_ID;
![]() |
Notes is a web-based application for online taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000+ notes created and continuing...
With notes.io;
- * You can take a note from anywhere and any device with internet connection.
- * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
- * You can quickly share your contents without website, blog and e-mail.
- * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
- * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.
Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.
Easy: Notes.io doesn’t require installation. Just write and share note!
Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )
Free: Notes.io works for 14 years and has been free since the day it was started.
You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;
Email: [email protected]
Twitter: http://twitter.com/notesio
Instagram: http://instagram.com/notes.io
Facebook: http://facebook.com/notesio
Regards;
Notes.io Team