SELECT raisonsociale AS "noms d'entreprises",
	CASE WHEN entreprisessouscontrat.id_entreprise = entreprises.id
	THEN cout = cout * COUNT(stagesemployes.id_employe) * duree * 0.9
	ELSE cout = cout * COUNT(stagesemployes.id_employe) * duree
	END AS "coût total"
	FROM stagesemployes, employes, entreprises, stages, entreprisessouscontrat
	WHERE stages.id = stagesemployes.id_stage AND stagesemployes.id_employe = employes.id AND employes.id_entreprise = entreprises.id
	GROUP BY raisonsociale, entreprisessouscontrat.id_entreprise, entreprises.id, cout, duree;
