fork download
  1. -- Question 1
  2. select distinct ville from client;
  3.  
  4. -- Question 2
  5.  
  6. select nom from medicament
  7. union
  8. select nom from archive_medicament;
  9.  
  10. -- Question 3
  11. select nom from medicament
  12. union all
  13. select nom from archive_medicament;
  14.  
  15. -- Question 4
  16. select distinct ville from client where ville in (select ville from fournisseur);
  17.  
  18. -- Question 5
  19. select ville from client c where exists(select 1 from fournisseur f where c.ville=f.ville);
  20.  
  21. -- Question 6
  22. select nom from client union select nom from fournisseur;
  23. -- Question 7
  24. select id_med from medicament
  25. where id_med in (select id_med from archive_medicament);
  26.  
  27. -- Question 8
  28. select distinct 'Oui' as 'Enregistré dans le systeme' from Commande where exists( select 1 from Commande);
  29.  
  30. select count(*) from commande;
  31.  
  32. -- question 9
  33. select distinct famille from Medicament;
  34.  
  35. -- question 10
  36. select id_med from medicament where id_med not in(select id_med from LigneCommande);
Success #stdin #stdout #stderr 0.01s 5316KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Error: near line 2: no such table: client
Error: near line 6: no such table: archive_medicament
Error: near line 11: no such table: archive_medicament
Error: near line 16: no such table: client
Error: near line 19: no such table: client
Error: near line 22: no such table: fournisseur
Error: near line 24: no such table: medicament
Error: near line 28: no such table: Commande
Error: near line 30: no such table: commande
Error: near line 33: no such table: Medicament
Error: near line 36: no such table: medicament