1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
| select libelle_marque,count (instrument.marque) as [presence dans catalogue],sum(prix) as [coût total instru]
from instrument,marque
where instrument.marque=marque.marque
group by instrument.marque,libelle_marque
UNION
select libelle_marque ,count (instrument.num_instru) as [ nbre de fois commandé],sum(prix) as [ca généré]
from instrument,marque,composer
where instrument.marque=marque.marque
and instrument.num_instru=composer.num_instru
and numcom IN (select numcom from commande)
group by libelle_marque,prix; |
Partager