Hi all,
I've written a query in SQL View. To be honest, its my first SQL Query EVER and I'm very happy that it works for half of what I need to do.
I'll paste the query here:
SELECT DISTINCT
Abs(Avg([Handoff Tracking].[Internal Kickoff?])) AS [Avg Of Internal Kickoff?],
Abs(Avg([Handoff Tracking].[E-Mailed prior to visit?])) AS [Avg Of E-Mailed prior to visit?],
Abs(Avg([Handoff Tracking].[Call to Support?])) AS [Avg Of Call to Support?],
Abs(Avg([Handoff Tracking].[Transfer to Support?])) AS [Avg Of Transfer to Support?],
Abs(Avg([Handoff Tracking].[Recieve Post trip Info?])) AS [Avg Of Recieve Post trip Info?],
Abs(Avg([Handoff Tracking].[Total Workstations])) AS [Avg Of Total Workstations],
Abs(Avg([Handoff Tracking].[Failed workstations])) AS [Avg Of Failed workstations],
Abs(Avg([Handoff Tracking].[Config File Issues?])) AS [Avg Of Config File Issues?],
Abs(Avg([Handoff Tracking].[3rd Party App Issues?])) AS [Avg Of 3rd Party App Issues?],
Abs(Avg([Handoff Tracking].[Welcome Pack Reviewed?])) AS [Avg Of Welcome Pack Reviewed?]
FROM [Handoff Tracking];
As you probably see above it does the average of [table name].[field name] then outside THOSE brackets it does the absolute value of that averaged value (the numbers USED to show up as negative numbers.
This query is great becuase it checks the average value of ALL records regardless of contact, which is good becuase I need something to compare each contact to.
Now I need to get a query that will do the average value, for all fields PER contact!
What would be the string to narrow the range of the average equation down to a per contact basis.
As far as relationships go I have 2 tables 1 for contacts.... and 1 for handoff tracking very simple DB structure wise. I just need to know how to do the same query as above, on a per user basis. Thanks for any input anyone might have
I've written a query in SQL View. To be honest, its my first SQL Query EVER and I'm very happy that it works for half of what I need to do.
I'll paste the query here:
SELECT DISTINCT
Abs(Avg([Handoff Tracking].[Internal Kickoff?])) AS [Avg Of Internal Kickoff?],
Abs(Avg([Handoff Tracking].[E-Mailed prior to visit?])) AS [Avg Of E-Mailed prior to visit?],
Abs(Avg([Handoff Tracking].[Call to Support?])) AS [Avg Of Call to Support?],
Abs(Avg([Handoff Tracking].[Transfer to Support?])) AS [Avg Of Transfer to Support?],
Abs(Avg([Handoff Tracking].[Recieve Post trip Info?])) AS [Avg Of Recieve Post trip Info?],
Abs(Avg([Handoff Tracking].[Total Workstations])) AS [Avg Of Total Workstations],
Abs(Avg([Handoff Tracking].[Failed workstations])) AS [Avg Of Failed workstations],
Abs(Avg([Handoff Tracking].[Config File Issues?])) AS [Avg Of Config File Issues?],
Abs(Avg([Handoff Tracking].[3rd Party App Issues?])) AS [Avg Of 3rd Party App Issues?],
Abs(Avg([Handoff Tracking].[Welcome Pack Reviewed?])) AS [Avg Of Welcome Pack Reviewed?]
FROM [Handoff Tracking];
As you probably see above it does the average of [table name].[field name] then outside THOSE brackets it does the absolute value of that averaged value (the numbers USED to show up as negative numbers.
This query is great becuase it checks the average value of ALL records regardless of contact, which is good becuase I need something to compare each contact to.
Now I need to get a query that will do the average value, for all fields PER contact!
What would be the string to narrow the range of the average equation down to a per contact basis.
As far as relationships go I have 2 tables 1 for contacts.... and 1 for handoff tracking very simple DB structure wise. I just need to know how to do the same query as above, on a per user basis. Thanks for any input anyone might have
