I'm missing some kind of a DISTINCT in this picture. The total is way too high.
I have 5 different provinces. If i ran this query on my data then the total amount is way higher than the no of records I have.
I must say, If i sum all the results I get the same number of records as I have when I query (without DISTINCT) in a wrongly way like this:
Main Topics
Browse All Topics





by: matthewspatrickPosted on 2008-10-24 at 03:44:38ID: 22794871
SELECT Count(q.CodePostal) AS nTotal, Sum(IIf(q.mode = "Papier", 1, 0) AS nPapier,
Sum(IIf(q.mode = "Internet", 1, 0) AS nInternet, ...
FROM QuestionnaireOffline q INNER JOIN
CodesPostal c ON q.CodePostal = c.CP
WHERE c.Province = "BRABANT WALLON"