Advertisement
Guest User

Untitled

a guest
Mar 25th, 2019
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 1.44 KB | None | 0 0
  1. SELECT *
  2. from U;
  3.  
  4. SELECT *
  5. from U
  6. where U.ville = "Londres";
  7.  
  8. SELECT NF
  9. from PUF
  10. where NU=1 and NP=1;
  11.  
  12. SELECT P.NomP, P.Couleur
  13. from P, PUF
  14. where P.NP = PUF.NP and PUF.NF = 1;
  15.  
  16. select PUF.NF
  17. from PUF, P where PUF.NU=1 and PUF.NP=P.NP and P.Couleur="rouge";
  18.  
  19. SELECT F.NomF from PUF, F, U, P where PUF.NF = F.NF and PUF.NU = U.NU and PUF.NP = P.NP and (U.Ville = "Londres" or U.Ville = "Paris") and P.Couleur="rouge";
  20.  
  21. SELECT distinct PUF.NP from PUF, U, F where U.Ville= F.Ville and PUF.NF=F.NF and PUF.NU=U.NU;
  22.  
  23. SELECT distinct PUF.NP from PUF, U, F where PUF.NF = F.NF and PUF.NU = U.NU and U.Ville = "Londres" and F.Ville = "Londres";
  24.  
  25. SELECT distinct PUF.NU from PUF, F, U where F.Ville != U.Ville and PUF.NF = F.NF and PUF.NU = U.NU;
  26.  
  27. SELECT distinct puf1.NF from PUF puf1, PUF puf2 where puf1.NF = puf2.NF and puf1.NU = 1 and puf2.NU = 2;
  28.  
  29. SELECT distinct PUF.NU from PUF where PUF.NP in (SELECT PUF.NP from PUF where PUF.NF=3);
  30.  
  31. SELECT P.NP from p where p.Poids in (select min(p.poids) from p);
  32.  
  33. select u.NU from U u where u.NU not in( select l.NU from PUF l, P p, F f where l.NP = p.NP and l.NF = f.NF and p.Couleur = "rouge" and f.Ville = "Londres" );
  34.  
  35. SELECT PUF.NF from PUF where PUF.NP in
  36.     (SELECT PUF.NP from PUF where PUF.NF in
  37.         (SELECT PUF.NF from PUF, P where PUF.NP = P.NP and P.Couleur = "rouge"));
  38.        
  39. SELECT distinct F.Ville as VilleF, PUF.NP, U.Ville AS VilleU from PUF, U, F where PUF.NF = F.NF and PUF.NU=U.NU;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement