1 / 36

sellers

sellers. sellers. insert into sellers (seller_id,seller_name,seller_userid, seller_password,seller_address,seller_phon,seller_fax,seller_dob,seller_status,seller_email) values ('302','saad','saad','1111','makah',213211,222,'01-11-11','locked ',' aa ');

barid
Télécharger la présentation

sellers

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. sellers

  2. sellers insert into sellers (seller_id,seller_name,seller_userid, seller_password,seller_address,seller_phon,seller_fax,seller_dob,seller_status,seller_email) values ('302','saad','saad','1111','makah',213211,222,'01-11-11','locked ','aa'); insert into sellers (seller_id,seller_name,seller_userid, seller_password,seller_address,seller_phon,seller_fax,seller_dob,seller_status,seller_email) values ('121','sarah','sarah','2222','damam',222212,233,'12-12-12','locked ',null); insert into sellers (seller_id,seller_name,seller_userid, seller_password,seller_address,seller_phon,seller_fax,seller_dob,seller_status,seller_email) values ('111','anfal','anfal','3333','damam', 222212,null,'03-05-11','locked ','ac');

  3. What is the name of the seller whose SELLER_ID is 302? 3

  4. Select seller_name from sellers where seller_id='302'

  5. List all sellers (by SELLER_ID and SELLER_NAME)that names not starting with M? 8

  6. Select seller_id,seller_name from sellers where seller_name not like 'M%';

  7. List all sellers addresses.Avoid repetition of sellers addresses. 12

  8. Select distinct seller_address from sellers;

  9. categories

  10. categories insert into categories (cat_id,cat_name,created_date)values ('1','math','11/03/12'); insert into categories (cat_id,cat_name,created_date)values ('2','computer','11/03/12'); insert into categories (cat_id,cat_name,created_date)values ('3','health','11/03/12');

  11. List all categories that names are 'MATH' or 'COMPUTER' or 'HEALTH’? 7

  12. Select * from categories wherecat_name='math' or cat_name='computer' or cat_name='health';OrSelect * from categories where cat_name in('math','computer','health');

  13. book

  14. book insert into book (book_id,cat_id,seller_id, book_name,book_isbn,book_author,book_price,shipment_cost,book_status)values ('102','1','302','b1','2221','a1',100,322.00,'sold‘,null); insert into book (book_id,cat_id,seller_id, book_name,book_isbn,book_author,book_price,shipment_cost,book_status)values ('103','2','121','b2','2111','a2',99,88,'sold‘, null); insert into book (book_id,cat_id,seller_id, book_name,book_isbn,book_author,book_price,shipment_cost,book_status)values ('105','3','111','b3','3333','a3',205,20,'sold‘, null);

  15. 1 List all data in the BOOKS table?

  16. Select * from book;

  17. List all books (by BOOK_ID and BOOK_NAME) in computer category? 2

  18. Select book_id,book_name from book where cat_id='2';

  19. Find all books priced less than 150 or greater than 200? 5

  20. Select book_name from book where book_price<150 or book_price>200;

  21. Findthe books (book_id and book_name) priced between 200and 300? 6

  22. Select book_id,book_name from book where book_price between 200 and 300;

  23. List all books that their prices less than 100? 11

  24. Select * from book where book_price<100;

  25. Find the names and prices of the books, arranged according their prices (the most expensive comes first) 13

  26. Select book_name,book_price from book order by book_price desc;

  27. buyer

  28. buyer insert into buyer (buyer_id,buyer_name,buyer_userid,buyer_password,buyer_address,buyer_phon, buyer_fax,buyer_dob,buyer_status,buyer_email)values ('1','gadah','gadah','1111','jedah',4352136,1231,'01/03/11','unlocked','@qq'); insert into buyer (buyer_id,buyer_name,buyer_userid,buyer_password,buyer_address,buyer_phon, buyer_fax,buyer_dob,buyer_status,buyer_email)values ('2','arwa','arwa','2222','makah',2314567,2223,'22/10/12','unlocked','@ss'); insert into buyer (buyer_id,buyer_name,buyer_userid,buyer_password,buyer_address,buyer_phon, buyer_fax,buyer_dob,buyer_status,buyer_email)values ('3','ali','ali','3333','damam',3425657,4433,'04/03/11','unlocked','aa@');

  29. List all buyers withbuyer-mail? 9

  30. Select * from sellers where seller_email is not null;

  31. List all buyers without buyer e-mail? 10

  32. Select * from sellers where seller_email is null;

  33. sales

  34. sales insert into sales (invoice_id,invoice_date,buyer_id,sal_tax_rate,ship_address,ship_phon,ship_fax,ship_deliver,ship_note)values ('111','22/10/11','2',20,'makah',2132213546,1232134,'yes ',null); insert into sales (invoice_id,invoice_date,buyer_id,sal_tax_rate,ship_address,ship_phon,ship_fax,ship_deliver,ship_note)values ('112','02/03/11','1',40,'abah',8345754984,3456543,'no',null); insert into sales (invoice_id,invoice_date,buyer_id,sal_tax_rate,ship_address,ship_phon,ship_fax,ship_deliver,ship_note)values ('113','11/12/11','3',50,'damam',3451287645,1234564,'yes ',null);

  35. Find all invoices (by invoices_id) of sales before 01/11/11? 4

  36. Select invoice_id from sales where invoice_date <'01/11/11;

More Related