create view V_TOTAL_PANIER as

    select

        PAN.idUser ,

        sum(PAN.quantite*ART.prix) as TOTAL

    from

        panier as PAN

        inner join 

            articles as ART 

        on ART.idArticle = PAN.idArticle

    group by

        PAN.idUser;



select TOTAL 

from V_TOTAL_PANIER 

where idUser = 1