R5
Afficher la liste de toutes les villes, par ordre alphabétique, sans doublon

SELECT DISTINCT city from hotels
ORDER BY city ASC
LIMIT 5;



R7
SELECT name FROM hotels
WHERE country != "USA" and country != "Angleterre";

R8
SELECT name FROM hotels 
WHERE country IN ('Italie', 'USA');

	-- ce qui Equivaut à
	-- SELECT name FROM hotels 
	-- WHERE country = 'Italie' or country = 'USA';

R10
update offers
set option_name = "Maison hantée formule luxe"
Where id_offer = 1;

R12 (requêtes imbriquées)
SELECT 
    AVG(option_price) AS moyenneDesOffres, 
    MIN(option_price) AS minimumDesOffres,
    (SELECT option_name FROM offers ORDER BY option_price ASC LIMIT 1) AS nomOffre
from offers;

R13
select COUNT(id_offer)
from offers
where option_name like "%formule%";


============
Jointures

SELECT COUNT(*) FROM offers
INNER JOIN hotels ON hotels.id_hotel = offers.id_hotel
WHERE hotels.country IN('France', 'Italie', 'Angleterre');

--

SELECT option_name, option_description FROM offers
INNER JOIN hotels ON hotels.id_hotel = offers.id_hotel
WHERE hotels.country = 'Italie' AND hotels.city <> 'Rome'
ORDER BY option_price DESC
LIMIT 1;





