Advertisement
mmouhib

6lack

Nov 24th, 2021
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. -- connect tpg2/tpg2
  2.  
  3. select p_num as "num projet", num_dept as "numero dep" from projet join departement using(num_dept)
  4. where p_location = 'Tunis';
  5.  
  6. select p_num, num_dept from projet join departement using(num_dept)
  7. where nom_dept = 'P_gestion';
  8.  
  9. select nom, adresse from employe join departement using(num_dept)
  10. where nom_dept = 'P_informatique';
  11.  
  12. select nom, prenom
  13. from employe join departement using (num_dept) join travail_dans using(nss)
  14. where heure = (
  15. select heure from travail_dans where (
  16. nss = (select nss from employe where nom = 'ali' and prenom = 'mohammed'))
  17. );
  18.  
  19.  
  20. select nom, prenom
  21. from employe, travail_dans
  22. where employe.nss= travail_dans.nss and heure = (
  23. select heure
  24. from travail_dans ,employe
  25. where employe.nss= travail_dans.nss and nom = 'ali' and prenom = 'mohamed' and p_num = 1
  26. )
  27. and nom != 'ali' and prenom != 'mohamed';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement