I have a form with the following fields
Company name
department
survey question 1 - a radio field with 4 options; A,B,C,D
How to fetch all records submitted in the above form based on company and department and get a count of how many records answered survey question 1 with A, how many answered B, How many answered C and how many answered D
I want first to fetch records using Company Name as 1st filter then based on all records obtained using Company name as a filter, use Department as a second filter to filter results leaving me with only results that are from Same company that are from the selected department
finally based on that filter results get counts in 4 separate numeric fields on how many records answered A, how many answered B,C and D
How can this be done?