Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

select numdept, count(nomE) from EMP

group by numdept;

select sum(salaire) from EMP

where sup=(select sup from EMP NomE="BERGER")

select NomE, Salaire from EMP

where Salaire=(select max(Salaire) from EMP);

select NomE,Salaire from EMP

where by Salaire desc

Limit 3;

select NomDept, EMP.NumDept, Poste, Lieu from Dept, EMP

where Dept.NumDept=EMP.NumDept;

and Lieu="paris"

select * from Dept;

select Emp.NumDept, NomE, Poste

from EMP, Dept

where Dept.NumDept=EMP.NumDept

and NomDept="VENTES");

select NomE, dateEmb, Salaire from EMP

where IFNULL(commission,0)=(select IFNULL(commission,0) from EMP NomE="DUBOIS")

and Salaire=(select Salaire from EMP where NomE="DUBOIS");

select IFNULL(commission,0) from EMP where NomE="DUBOIS";

select NumDept from EMP

having count(atr)>(select count(Matr) fromEMP where NumDept=10);


select NumDept,count(Matr) from EMP

group by NumDept;

select NumDept, count(Matr) from EMP

group by NumDept

order bycount(Matr)

select distinct Poste from EMP;

select NomE from EMP where Salaire=IFNULL(commission,0);

select NomE from EMP where commission is null;

select distinct NomE from EMP

where NomE like"_E%"

select distinct NulDept from EMP , Dept

where EMP.NumDept=Dept.NumDept

and commission is not null;

select distinct NomE from EMP where Salaire between 2000 and 8000;

select NomE, Lieu from EMP, Dept

where EMP.NumDept=Dept.NumDept

and commission is not null;

You might also like