I have a query that takes in two dates, start and end, and a team as parameters. It calculates average interview times, and total interviews grouping by each person in that team. I would like to add a column at the end that shows the total number of interviews done by the entire team.
Output as it is now...
Name............Average Time..........Interviews
Matthew............30.........................7
Jane..................29.........................11
Output I would like
Name............Average Time Interviews Team Interviews
Matthew..........30...............7....................67
Jane................29..............11...................67
Here is the sql as I have it now,
SELECT tblInterviews.[Revenue Specialist], Avg(tblInterviews.[Interview Length]) AS [AvgOfInterview Length], Count(tblInterviews.[Interview Length]) AS [CountOfInterview Length]
FROM tblClient INNER JOIN tblInterviews ON tblClient.VisitID = tblInterviews.VisitID
WHERE (((tblClient.Date) Between [start?] And [End?]) AND ((tblInterviews.[Time End]) Is Not Null))
GROUP BY tblInterviews.[Revenue Specialist], tblInterviews.Subprocess
HAVING (((tblInterviews.[Revenue Specialist]) Is Not Null) AND ((tblInterviews.Subprocess)=[Team?]) AND ((Avg(tblInterviews.[Interview Length])) Is Not Null));
Any suggestions on how I could add a total number of interviews field?
Output as it is now...
Name............Average Time..........Interviews
Matthew............30.........................7
Jane..................29.........................11
Output I would like
Name............Average Time Interviews Team Interviews
Matthew..........30...............7....................67
Jane................29..............11...................67
Here is the sql as I have it now,
SELECT tblInterviews.[Revenue Specialist], Avg(tblInterviews.[Interview Length]) AS [AvgOfInterview Length], Count(tblInterviews.[Interview Length]) AS [CountOfInterview Length]
FROM tblClient INNER JOIN tblInterviews ON tblClient.VisitID = tblInterviews.VisitID
WHERE (((tblClient.Date) Between [start?] And [End?]) AND ((tblInterviews.[Time End]) Is Not Null))
GROUP BY tblInterviews.[Revenue Specialist], tblInterviews.Subprocess
HAVING (((tblInterviews.[Revenue Specialist]) Is Not Null) AND ((tblInterviews.Subprocess)=[Team?]) AND ((Avg(tblInterviews.[Interview Length])) Is Not Null));
Any suggestions on how I could add a total number of interviews field?
Last edited: