SQLTeam.com | Weblogs | Forums

Grouping table data


Hi, Il start off by saying that this is not my area of expertise. I am trying to make a query thattakes all the calls etc for each employee in one table and displays each employees total calls, average call time, total call time etc for incoming and outgoing call in another table.. My IT person at my work dose not have the time to make this for me so any help would be Great. Bellow shows the names of each tables column names.

Column Names
Date (Date)
Employee ID (nchar 10)
Total Incoming Calls (int)
Total Outgoing Calls (int)
Total Incoming Call Duration (time (7)
Total Outgoing Call Duration (time (7)
Total On Call Time (nvarchar 20)
Call Type (nvarchar 20)


I wish people wouldn't post images ... to give you an answer I've got to type in all the column names from your CallLog_Table ... sorry, I haven't got the time. Post a CREATE TABLE statement, some sample data (as INSERT statements) and your expected results, folk will then give you worked examples without each person having to manually type everything in themselves.

I'm sure they will forgive you if you don't know how to post the data as Insert statements if you provide the data as comma delimited or similar instead :slight_smile: