Tubbs
07-05-2005, 10:59 PM
Hi,
I've got this query to get the most frequent value in a field (this may be wrong somewhere)....
SELECT TOP 1 Main_DB.Complainant_Name, Count(*) AS CallCount, First(Main_DB.Address) AS FirstOfAddress, First(Main_DB.Complainant_Phone) AS FirstOfComplainant_Phone
FROM Main_DB
WHERE (((Main_DB.Date_Logged) Between Date() And Date()-Month(1)))
GROUP BY Main_DB.Complainant_Name
ORDER BY Count(*) DESC;
I'm using this query to populate a report. However, I also need to display another field with multiple records from the same table. I need to display each of the values in the field "Complaint" corresponding to "Complainant_Name" derived from the above query.
How do I go about doing this?
Cheers,
Tubbs
I've got this query to get the most frequent value in a field (this may be wrong somewhere)....
SELECT TOP 1 Main_DB.Complainant_Name, Count(*) AS CallCount, First(Main_DB.Address) AS FirstOfAddress, First(Main_DB.Complainant_Phone) AS FirstOfComplainant_Phone
FROM Main_DB
WHERE (((Main_DB.Date_Logged) Between Date() And Date()-Month(1)))
GROUP BY Main_DB.Complainant_Name
ORDER BY Count(*) DESC;
I'm using this query to populate a report. However, I also need to display another field with multiple records from the same table. I need to display each of the values in the field "Complaint" corresponding to "Complainant_Name" derived from the above query.
How do I go about doing this?
Cheers,
Tubbs