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.  
  10. -- Q5
  11. select distinct ville from client c where exists(select ville from fournisseur f where f.ville=c.ville);
  12.  
  13. -- Q6
  14. select nom from client union select nom from fournisseur;
  15.  
  16. -- Q7
  17. select id_med, nom from medicament where id_med in(select id_med from Archive_Medicament);
  18.  
  19. -- Q8
  20. select count(*) from commande;
  21. select distinct 'Yes it EXISTS' as 'Commande' from commande where exists(select 1 from commande);
  22.  
  23. -- Q9
  24. select distinct famille from medicament;
  25.  
  26. -- Q10;
  27. select id_med from Medicament where id_med not in(select id_med from ligneCommande);
  28.  
  29.  
Success #stdin #stdout #stderr 0s 5316KB
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 11: no such table: client
Error: near line 14: no such table: fournisseur
Error: near line 17: no such table: medicament
Error: near line 20: no such table: commande
Error: near line 21: no such table: commande
Error: near line 24: no such table: medicament
Error: near line 27: no such table: Medicament