A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

top 5%



 
 
Thread Tools Display Modes
  #1  
Old October 16th, 2009, 04:57 AM posted to microsoft.public.access.tablesdbdesign
dtoney
external usenet poster
 
Posts: 65
Default top 5%

I have a list of applications that have help desk tickets and need to
determine the top 5% of defects by the number of tickets called in per month.
What would be the best way to set this up? I considered using the results of
a cross tab query but dont really know how to get the top 5% by month...
please help!
  #2  
Old October 16th, 2009, 09:39 AM posted to microsoft.public.access.tablesdbdesign
Stefan Hoffmann
external usenet poster
 
Posts: 991
Default top 5%

hi,

dtoney wrote:
I have a list of applications that have help desk tickets and need to
determine the top 5% of defects by the number of tickets called in per month.
What would be the best way to set this up? I considered using the results of
a cross tab query but dont really know how to get the top 5% by month...
please help!

For the pivot query use the wizard and to gather your data use:

SELECT TOP 5 PERCENT *
FROM [yourTable]


mfG
-- stefan --
  #3  
Old October 16th, 2009, 09:43 AM posted to microsoft.public.access.tablesdbdesign
Stefan Hoffmann
external usenet poster
 
Posts: 991
Default top 5%

hi,

Not correct as not complete:
SELECT TOP 5 PERCENT *
FROM [yourTable]

ORDER BY [yourFieldList]

mfG
-- stefan --
  #4  
Old October 19th, 2009, 05:26 PM posted to microsoft.public.access.tablesdbdesign
KARL DEWEY
external usenet poster
 
Posts: 10,767
Default top 5%

These queries will get you part way there --
Call_Data_Application --
SELECT Format([CallData].[CallDate],"mmmm yyyy") AS Call_Month,
Format([CallData].[CallDate],"yyyymm") AS CallMon, CallData_1.Application
FROM CallData, CallData AS CallData_1
GROUP BY Format([CallData].[CallDate],"mmmm yyyy"),
Format([CallData].[CallDate],"yyyymm"), CallData_1.Application
ORDER BY Format([CallData].[CallDate],"yyyymm");

Call_Data_Application_1
SELECT Call_Data_Application.Call_Month, Call_Data_Application.CallMon,
Call_Data_Application.Application,
Sum(IIf(Format([CallData].[CallDate],"yyyymm")=[CallMon],1,0))/[CountOfApplication] AS Percent_Of_Month
FROM (Call_Data_Application LEFT JOIN CallData ON
Call_Data_Application.Application = CallData.Application) INNER JOIN
Call_Data_Application_2 ON Call_Data_Application.CallMon =
Call_Data_Application_2.Call_Mon
GROUP BY Call_Data_Application.Call_Month, Call_Data_Application.CallMon,
Call_Data_Application.Application, Call_Data_Application_2.CountOfApplication
ORDER BY Call_Data_Application.CallMon;

Call_Data_Application_2 --
SELECT Format([CallData].[CallDate],"yyyymm") AS Call_Mon,
Count(CallData.Application) AS CountOfApplication
FROM CallData
GROUP BY Format([CallData].[CallDate],"yyyymm");

--
Build a little, test a little.


"dtoney" wrote:

I have a list of applications that have help desk tickets and need to
determine the top 5% of defects by the number of tickets called in per month.
What would be the best way to set this up? I considered using the results of
a cross tab query but dont really know how to get the top 5% by month...
please help!

  #5  
Old October 22nd, 2009, 08:52 PM posted to microsoft.public.access.tablesdbdesign
dtoney
external usenet poster
 
Posts: 65
Default top 5%

If I'm understanding correctly... all of that code appears to merely be
creating sum of incidents by month by application... which in affect is about
the same as a crosstab query... the only advantage I see is that you have the
year - which is albeit lost in the crosstab without additional coding.

please help me understand if I'm off base.

Thanks!

"KARL DEWEY" wrote:

These queries will get you part way there --
Call_Data_Application --
SELECT Format([CallData].[CallDate],"mmmm yyyy") AS Call_Month,
Format([CallData].[CallDate],"yyyymm") AS CallMon, CallData_1.Application
FROM CallData, CallData AS CallData_1
GROUP BY Format([CallData].[CallDate],"mmmm yyyy"),
Format([CallData].[CallDate],"yyyymm"), CallData_1.Application
ORDER BY Format([CallData].[CallDate],"yyyymm");

Call_Data_Application_1
SELECT Call_Data_Application.Call_Month, Call_Data_Application.CallMon,
Call_Data_Application.Application,
Sum(IIf(Format([CallData].[CallDate],"yyyymm")=[CallMon],1,0))/[CountOfApplication] AS Percent_Of_Month
FROM (Call_Data_Application LEFT JOIN CallData ON
Call_Data_Application.Application = CallData.Application) INNER JOIN
Call_Data_Application_2 ON Call_Data_Application.CallMon =
Call_Data_Application_2.Call_Mon
GROUP BY Call_Data_Application.Call_Month, Call_Data_Application.CallMon,
Call_Data_Application.Application, Call_Data_Application_2.CountOfApplication
ORDER BY Call_Data_Application.CallMon;

Call_Data_Application_2 --
SELECT Format([CallData].[CallDate],"yyyymm") AS Call_Mon,
Count(CallData.Application) AS CountOfApplication
FROM CallData
GROUP BY Format([CallData].[CallDate],"yyyymm");

--
Build a little, test a little.


"dtoney" wrote:

I have a list of applications that have help desk tickets and need to
determine the top 5% of defects by the number of tickets called in per month.
What would be the best way to set this up? I considered using the results of
a cross tab query but dont really know how to get the top 5% by month...
please help!

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 02:19 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.