Professional Documents
Culture Documents
Nomcomplet Etudiant
Nomcomplet Etudiant
*LICENCE2*
*ESTI*
Exercice2:
Microsoft Windows [version 10.0.19043.1826]
(c) Microsoft Corporation. Tous droits réservés.
C:\Users\User>mysql -u root -p
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 21
Server version: 10.4.24-MariaDB mariadb.org binary distribution
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
Exercice1:
MariaDB [entreprises]> create table departements
-> (
-> DNO int not null primary key,
-> DNOM varchar(50),
-> DIR varchar(50),
-> ville varchar(50));
Query OK, 0 rows affected (0.395 sec)
2.Donnons les noms,emplois et salaires des employers par emploi croissant,et pour
chaque emploi par salaire decroissant
select ENOM,PROF,SAL from employers order by PROF asc;
7.Donnons le ou les emplois ayant le salaire moyen le plus bas,ainsi que ce salaire
moyen
MariaDB [entreprises]> select PROF,avg(SAL) from employers where SAL=avg(SAL) group
by PROF;
Exercice2:
C:\Users\User>mysql -u root -p
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 24
Server version: 10.4.24-MariaDB mariadb.org binary distribution
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
1.
MariaDB [tour]> select numero_coureur,nom_coureur,pays_coureur from
coureur,equipe,pays where equipe.code_equipe=coureur.code_equipe and
pays.code_pays=coureur.code_pays and nom_equipe='Festina';
2.
MariaDB [tour]> select sum(nbkm) from etape;
3.
MariaDB [tour]> select sum(nbkm) from etape,type_etape where
type_etape.code_type=etape.code_type and libelle_type='Haute Montagne' ;
4.
MariaDB [tour]> select nom_coureur from coureur,attribuer_bonification where
coureur.numero_coureur=attribuer_bonification.numero_coureur and km is not null and
rang is not null and nb_seccondes is not null;
5.
MariaDB [tour]> select nom_coureur from coureur,participer where
coureur.numero_coureur=participer.numero_coureur and temps realiser is not null;