ID_ART CODE_ART 1 AAA 2 BBB 3 CCC 4 DDD 5 EEE
ID_SOR ID_ART QUANTITY_SOR PRICE_SOR QUANTITY_SOR * PRICE_SOR 1 1 1 25.23 25.23 2 1 5 22.51 112.55 3 2 1 15 15 4 4 8 5 40 5 4 2 5.6 11.2 6 4 4 5.3 21.2 7 2 2 14.5 29
ID_ART CODE_ART SUM(QUANTITY_SOR * PRICE_SOR) 1 AAA 137.78 2 BBB 44 4 DDD 72.4
SELECT a.ID_ART, a.CODE_ART, SUM(m.QUANTITY_SOR * m.PRICE_SOR) FROM mouvements m inner join articles a on a.ID_ART = m.ID_ART group by a.ID_ART, a.CODE_ART
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)