
select * from congressiste where n_hotel = 2 or n_hotel = 3 or n_hotel = 4 ;
select * from activite where date_act = '2013-11-13' or date_act = '2013-11-22' ;
select * from hotell ORDER BY nom_hotel ASC ;
select * from activite where prix_activite between 200 and 520 ;
select nom_congressiste ,prenom_congressiste from congressiste where
nom_congressiste LIKE'B%' ;
select * from hotell where nom_hotel LIKE '%a%' ;
select nom_congressiste ,prenom_congressiste from congressiste where
nom_congressiste LIKE'%t' ;
select * from hotell where prix_participation between 35 and 55 and prix_suppl
between 20 and 30;
select prix_participation + prix_suppl as total from hotell ;
select n_congressiste , nom_congressiste,nom_hotel from congressiste ,hotell
where congressiste.n_hotel =hotell.n_hotel
select n_congressiste , nom_congressiste,nom_hotel ,nom_org from congressiste
,hotell , organisme_payeur where congressiste.n_hotel =hotell.n_hotel and
congressiste.n_org = organisme_payeur.n_organisme;
select n_congressiste , nom_congressiste,nom_hotel from congressiste ,hotell
where congressiste.n_hotel =hotell.n_hotel order by nom_hotel asc ;
select n_congressiste , nom_congressiste,nom_hotel from congressiste ,hotell
where congressiste.n_hotel =hotell.n_hotel order by nom_congressiste asc ;
select n_congressiste , nom_congressiste,nom_hotel from congressiste ,hotell
where congressiste.n_hotel =hotell.n_hotel and address_hotel='Blida' order by
nom_congressiste asc ;
Requêtes par fonction
select count (*) from congressiste ;
select avg (prix_participation ) from hotell where address_hotel ='Alger' ;
select avg (prix_suppl ) from hotell where address_hotel ='Alger' ;
select n_activite , count (n_cong) as num_cong from participation
group by (n_activite);
select n_cong , avg(nbr_personne) as moyenne from participation group by n_cong
having count (n_activite) >2 ;
Requêtes imbrique
select nom_congressiste , prenom_congressiste from congressiste where
n_congressiste in (select n_cong from participation where n_activite = 3);
select nom_congressiste , prenom_congressiste from congressiste where
n_congressiste in (select n_cong from participation , activite where
participation.n_activite=activite.n_activite and nom_activite != 'toumoi');
select nom_congressiste , prenom_congressiste from congressiste where n_hotel in
(select n_hotel from hotell where (prix_participation + prix_suppl) >70 );
select nom_congressiste , prenom_congressiste from congressiste ,participation
where congressiste.n_congressiste = participation.n_cong and n_activite in(select