Created
October 5, 2022 10:00
-
-
Save Hotfirenet/94872c61a4ce86dc045eec2c2a031b5b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT SUM(A.DL_Qte) AS 'Qte', SUM(A.DL_MontantHT) AS MontantHT, MONTH(A.DO_Date) AS mois, YEAR(A.DO_Date) AS annee, A.AR_Ref, C.TYPECLIENT, E.LI_Pays | |
FROM dbo.F_DOCLIGNE A | |
INNER JOIN dbo.F_DOCENTETE D ON D.DO_Piece = A.DO_Piece | |
INNER JOIN dbo.F_LIVRAISON E ON E.LI_No = D.LI_No | |
INNER JOIN [dbo].[F_ARTICLE] B ON B.AR_Ref = A.AR_Ref | |
INNER JOIN [dbo].[F_COMPTET] C ON C.CT_Num = A.CT_Num | |
WHERE A.DO_Type IN (6, 7) AND YEAR(A.DO_Date) >= 2021 AND B.MARQUE IN ('AQARA') | |
GROUP BY MONTH(A.DO_Date), YEAR(A.DO_Date), A.AR_Ref, C.TYPECLIENT, E.LI_Pays | |
ORDER BY 4,3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment