Complicated Query

P

Pietro

Hi all,


I'm basing a query on a table called"CSAT",I need to do the following
fields:
Sample Size:Count all the rows of the table "CSAT"
Satisfaction:Count the field QAns2 if it is more than 7
Dissatisfaction:Count the field QAns2 if it is less than 5

I need to group these results by "Language","Called ID"
Is it possible,'ve been trying to do it since two days but i cannot....
 
A

Alp Bekisoglu

I think you can do that via a query like:
SELECT Count(CSAT.anyfieldinthetable) AS CountOfthesamefield,
Sum(IIf([QAns2]>7,1,0)) AS satisfaction, Sum(IIf([QAns2]<5,1,0)) AS
[dissatisfaction]
FROM CSAT;

Hope this helps.

Alp
 
Top