A
Andy
need a report that looks like this:
Region County Precinct #ofActivists #ofHouseholds
HouseholdswithPhones
This is tricky because the NumberofActivists column needs
to return the total number of activists in each precinct
while the next column needs to return the number of
households (ie, where the address is the same -3 people
could live at the same address) and the
householdswithPhones column needs to be based on that.
I using the query below as the data source. The phone
column in this query gives me the toal number of people
with phones, not the number of households with phones.
SELECT [Key Activists Statewide Again].Region, [Key
Activists Statewide Again].County, [Key Activists
Statewide Again].Precinct, Count([Key Activists Statewide
Again].County) AS [Number of Key Activists], SUM(([Key
Activists Statewide Again].Phone Is Not Null)*-1) AS
HasPhone
FROM [Key Activists Statewide Again]
GROUP BY [Key Activists Statewide Again].Region, [Key
Activists Statewide Again].County, [Key Activists
Statewide Again].Precinct;
so basically, how do I add a DISTINCT statement for the
address field that works for only the last two columns of
the report?
Region County Precinct #ofActivists #ofHouseholds
HouseholdswithPhones
This is tricky because the NumberofActivists column needs
to return the total number of activists in each precinct
while the next column needs to return the number of
households (ie, where the address is the same -3 people
could live at the same address) and the
householdswithPhones column needs to be based on that.
I using the query below as the data source. The phone
column in this query gives me the toal number of people
with phones, not the number of households with phones.
SELECT [Key Activists Statewide Again].Region, [Key
Activists Statewide Again].County, [Key Activists
Statewide Again].Precinct, Count([Key Activists Statewide
Again].County) AS [Number of Key Activists], SUM(([Key
Activists Statewide Again].Phone Is Not Null)*-1) AS
HasPhone
FROM [Key Activists Statewide Again]
GROUP BY [Key Activists Statewide Again].Region, [Key
Activists Statewide Again].County, [Key Activists
Statewide Again].Precinct;
so basically, how do I add a DISTINCT statement for the
address field that works for only the last two columns of
the report?