1 2 3 4 5 6
| TRANSFORM Sum(CCur([Détails commandes].[Prix unitaire]*[Quantité]*(1-[Remise (%)])/100)*100) AS MontantProduit
SELECT Catégories.[Nom de catégorie], Year([Date commande]) AS AnnéeCommande
FROM Catégories INNER JOIN (Produits INNER JOIN (Commandes INNER JOIN [Détails commandes] ON Commandes.[N° commande] = [Détails commandes].[N° commande]) ON Produits.[Réf produit] = [Détails commandes].[Réf produit]) ON Catégories.[Code catégorie] = Produits.[Code catégorie]
WHERE (((Commandes.[Date commande]) Between #1/1/1997# And #12/31/1997#))
GROUP BY Catégories.[Nom de catégorie], Year([Date commande])
PIVOT "Trim " & DatePart("q",[Date commande],1) In ("Trim 1","Trim 2","Trim 3","Trim 4"); |
Partager