Advertisement
Guest User

Untitled

a guest
Dec 12th, 2019
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.38 KB | None | 0 0
  1. create database RECETE;
  2. use RECETE;
  3. create table Ingredient_Classes
  4. (
  5. Ingred_Class_ID int not null,
  6. Ingred_Class_Description text not null
  7. );
  8.  
  9. create table Selling
  10. (
  11. Ingred_ID int not null,
  12. Ingred_Name text not null,
  13. Ingred_Class_ID int not null,
  14. Measure int not null
  15. );
  16.  
  17.  
  18. insert into Collaborators values (01, 'Beshieru', 'Moldova','002','0789234756');
  19. insert into Collaborators values (02, 'Cibotari', 'Romania','003','079370878');
  20. insert into Collaborators values (03, 'Caraus', 'Moldova','004','079856734');
  21. insert into Collaborators values (04, 'Rusu', 'Germania','005','068945672');
  22. insert into Collaborators values (05, 'Bolduratu', 'Rusia','006','069345678');
  23. insert into Collaborators values (06, 'Ipati', 'Polonia','007','087956392');
  24.  
  25. insert into Selling values (1 , 'Tennis' , 01 , '1','200','70');
  26. insert into Selling values (2 , 'Football' , 02 ,'2','250','80' );
  27. insert into Selling values (3 , 'Basketball' , 03, '2','560','90');
  28. insert into Selling values (4 , 'Tennis' , 04 ,'3','789','20' );
  29. insert into Selling values (5 , 'Football' , 05,'2','870','15');
  30. insert into Selling values (6 , 'Football' , 06 , '2','900','20');
  31.  
  32. select* from Collaborators;
  33. select* from Selling;
  34.  
  35. select Coll_Name, Position
  36. from Collaborators;
  37.  
  38. select Coll_Name,Price,Amount
  39. from Collaborators inner join Selling
  40. on Collaborators.Coll_ID = Selling.Coll_ID;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement