So far, The fields are all from one table (members13). The data is being pulled from the fields memnum (membership number), Branch (name of the branch), Gender (male/female) and the current month from a variable input. I have tried using :-
SELECT Branch, COUNT(*)
FROM members13
GROUP BY Branch
which gives me a list of the branches and the total members for each branch.
have also tried:-
SELECT Branch, COUNT(*)
FROM members13
WHERE Gender = 'Male'
GROUP BY Branch
which gives me a list of the branches with all the male totals.
I need this in 1 query (if possible) or the easiest way to get the results below:
BRANCH - TOTAL MALES - TOTAL FEMALES - TOTAL
branch1 20 18 38
branch2 44 21 65
etc.
Hope this helps