fork download
  1. -- Q1
  2. select distinct ville from client;
  3. -- Q2
  4. select nom from medicament union select nom from archive_medicament;
  5. -- Q3
  6. select nom from medicament union all select nom from archive_medicament;
  7. -- Q4
  8. select distinct ville from client where ville in(select ville from fournisseur);
  9. -- Q5
  10. select distinct ville from client c where exists(select ville from fournisseur f where c.ville = f.ville);
  11.  
  12. -- Q6
  13. select nom from client union select nom from fournisseur;
  14.  
  15. -- Q7
  16. select distinct id_med from medicament where id_med in (select id_med from Archive_Medicament);
  17.  
  18. -- Q8
  19. select count(*) from commande;
  20.  
  21. select distinct 'Oui' as 'il y a commande' from commande where exists(select id_cmd from commande);
  22.  
  23. -- Q9
  24. select distinct famille from medicament;
  25. -- Q10
  26. select id_med from medicament where id_med not in( select id_med from lignecommande);
  27.  
  28.  
Success #stdin #stdout #stderr 0.01s 5304KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Error: near line 2: no such table: client
Error: near line 4: no such table: archive_medicament
Error: near line 6: no such table: archive_medicament
Error: near line 8: no such table: client
Error: near line 10: no such table: client
Error: near line 13: no such table: fournisseur
Error: near line 16: no such table: medicament
Error: near line 19: no such table: commande
Error: near line 21: no such table: commande
Error: near line 24: no such table: medicament
Error: near line 26: no such table: medicament