E
efandango
My table looks like this:
TestDate Tempscore
23/01/2007 1
23/01/2007 0
26/01/2007 1
26/01/2007 1
29/01/2007 1
29/01/2007 1
01/02/2007 0
01/02/2007 1
04/02/2007 1
04/02/2007 1
04/02/2007 0
04/02/2007 1
07/02/2007 0
07/02/2007 0
I want to be able to get two sets of results (totals) for each date.
All those that are correct (1's), but not listing those that are incorrect
(0's)
So that I get:
TestDate Tempscore
23/01/2007 1
26/01/2007 2
29/01/2007 2
01/02/2007 1
04/02/2007 3
I have tried: (But with this SQL I also get the '0' scores listed.)
SELECT Tbl_Scores_Running_Totals.TestDate,
Sum(Tbl_Scores_Running_Totals.Tempscore) AS SumOfTempscore
FROM Tbl_Scores_Running_Totals
GROUP BY Tbl_Scores_Running_Totals.TestDate
HAVING
(((Sum(Tbl_Scores_Running_Totals.Tempscore))=Sum(IIf([Tempscore],1,0))));
TestDate Tempscore
23/01/2007 1
23/01/2007 0
26/01/2007 1
26/01/2007 1
29/01/2007 1
29/01/2007 1
01/02/2007 0
01/02/2007 1
04/02/2007 1
04/02/2007 1
04/02/2007 0
04/02/2007 1
07/02/2007 0
07/02/2007 0
I want to be able to get two sets of results (totals) for each date.
All those that are correct (1's), but not listing those that are incorrect
(0's)
So that I get:
TestDate Tempscore
23/01/2007 1
26/01/2007 2
29/01/2007 2
01/02/2007 1
04/02/2007 3
I have tried: (But with this SQL I also get the '0' scores listed.)
SELECT Tbl_Scores_Running_Totals.TestDate,
Sum(Tbl_Scores_Running_Totals.Tempscore) AS SumOfTempscore
FROM Tbl_Scores_Running_Totals
GROUP BY Tbl_Scores_Running_Totals.TestDate
HAVING
(((Sum(Tbl_Scores_Running_Totals.Tempscore))=Sum(IIf([Tempscore],1,0))));