1 2 3 4 5 6 7 8 9 10 11 12 13
| SELECT DOSSIER.[PO Nature Travaux AGGLO], DOSSIER.[Type Menage PO], Count(*) AS Total, 0 as Ordre
FROM DOSSIER
UNION (
SELECT "TOTAL", DOSSIER.[Type Menage PO], sum(Count(*)), 1 as Ordre FROM DOSSIER GROUP BY DOSSIER.[Type Menage PO], "TOTAL", 1)
HAVING (((DOSSIER.[Type Proprietaire])="Occupant"))
TRANSFORM Nz(Sum(Rtotal.Total),"0") AS SommeDeTotal
SELECT Rtotal.[PO Nature Travaux AGGLO], Nz(Sum(Rtotal.Total),"0") AS [Total colonne]
FROM Rtotal
GROUP BY Rtotal.[PO Nature Travaux AGGLO], ordre
ORDER BY Ordre
PIVOT Rtotal.[Type Menage PO]; |
Partager