Hi. I have a tblContact_Ken with ID, SOURCE, SOLD(YES/NO), LASTDATE.
Here's my query:
SELECT tblContact_Ken.SOURCE, Count(tblContact_Ken.ID) AS Leads, Round(Count(ID)/(SELECT count(ID) from tblContact_Ken WHERE (((tblContact_Ken.LASTDATE) Between [Start Date] And [End Date])))*100) AS Percentage
FROM tblContact_Ken
WHERE (((tblContact_Ken.LASTDATE) Between [Start Date] And [End Date]))
GROUP BY tblContact_Ken.SOURCE
ORDER BY Count(tblContact_Ken.ID) DESC;
The result looks like this:
SOURCE LEADS PERCENT
PREVENTION 50 33
READERS DIGST 40 22
..
What I want to do is to get the total number sold for each grouped source and percentages, so this is what I want.
SOURCE LEADS PERCENT SOLD PERCENT(SOLD/LEADS)
PREVENTION 50 33 10 20%
READERS DIGST 40 22 10 25%
This is so confusing to me. I really need some help.
Thanks in advance!
Here's my query:
SELECT tblContact_Ken.SOURCE, Count(tblContact_Ken.ID) AS Leads, Round(Count(ID)/(SELECT count(ID) from tblContact_Ken WHERE (((tblContact_Ken.LASTDATE) Between [Start Date] And [End Date])))*100) AS Percentage
FROM tblContact_Ken
WHERE (((tblContact_Ken.LASTDATE) Between [Start Date] And [End Date]))
GROUP BY tblContact_Ken.SOURCE
ORDER BY Count(tblContact_Ken.ID) DESC;
The result looks like this:
SOURCE LEADS PERCENT
PREVENTION 50 33
READERS DIGST 40 22
..
What I want to do is to get the total number sold for each grouped source and percentages, so this is what I want.
SOURCE LEADS PERCENT SOLD PERCENT(SOLD/LEADS)
PREVENTION 50 33 10 20%
READERS DIGST 40 22 10 25%
This is so confusing to me. I really need some help.
Thanks in advance!