S
ScottMsp
Median and Quartiles:
Thanks for reading this. I have read most/all of the posts out there re:
Median and Quartiles and I have attempted a variety of the recommendations
however I have not been able to get them to work and so I am posting my
question on the board. I am using Access 2007. I have some/little knowledge
of VBA and SQL.
I have a table tEmployeeMaster and three of the fields are:
JobCode (text field)
PersonID (text field)
HourlyRate (currency field)
I need to be able to calculate the 1st, 2nd (Median), and 3rd quartiles of
HourlyRate based on the job code.
If I have the following table data:
JobCode PersonID HourlyRate
01 532 10
01 4685 11
01 1256 12
01 9856 13
02 7813 5
02 6523 6
02 9568 7
02 1245 8
I need a query to produce the 1st, 2nd (Median), and 3rd quartile for each
job code
JobCode Q1 Q2 (Median) Q3
01 10.75 11.5 12.25
02 5.75 6.5 7.25
And so on…
I have approximately 20,000 records and the query results should have
approximately 1,800 different JobCodes and their corresponding statistics.
Thanks in advance for your help.
-ScottMSP
Thanks for reading this. I have read most/all of the posts out there re:
Median and Quartiles and I have attempted a variety of the recommendations
however I have not been able to get them to work and so I am posting my
question on the board. I am using Access 2007. I have some/little knowledge
of VBA and SQL.
I have a table tEmployeeMaster and three of the fields are:
JobCode (text field)
PersonID (text field)
HourlyRate (currency field)
I need to be able to calculate the 1st, 2nd (Median), and 3rd quartiles of
HourlyRate based on the job code.
If I have the following table data:
JobCode PersonID HourlyRate
01 532 10
01 4685 11
01 1256 12
01 9856 13
02 7813 5
02 6523 6
02 9568 7
02 1245 8
I need a query to produce the 1st, 2nd (Median), and 3rd quartile for each
job code
JobCode Q1 Q2 (Median) Q3
01 10.75 11.5 12.25
02 5.75 6.5 7.25
And so on…
I have approximately 20,000 records and the query results should have
approximately 1,800 different JobCodes and their corresponding statistics.
Thanks in advance for your help.
-ScottMSP