I have a query with right or is it a left join
SELECT Ref_SAE.Code, Count(Ref_SAE.Code) AS CompteDeCode
FROM Ref_SAE LEFT JOIN ETA ON Ref_SAE.Code = ETA.CodeSAE
WHERE (((ETA.StatutCSST)=Yes))
GROUP BY Ref_SAE.Code
ORDER BY Ref_SAE.Code;
the Ref_SAE table has 32 catégories the eta table has some 12 000 cases joined by the variable codeSAE. But ou the table has no results for REF_SAE 19 and 31.
I wanted my query to give the count for all 32 categories meaning a zero in the listing for code = 19 and 31
this is what I get
code count
1 2372
2 22
3 67
4 30
5 190
6 162
7 57
8 39
9 2
10 45
11 385
12 93
13 58
14 13
15 547
16 2750
17 3
18 40
20 19
21 3116
22 106
23 70
24 2
25 23
26 773
27 28
28 323
29 488
30 1106
32 70
I thought this would be simple