December 13, 2008 at 1:58 pm
Hi all,
How can i get the rank, total rank and percentile in SQL I have no clue!!
Please guide!!
Thanks
Pat
December 13, 2008 at 2:32 pm
For a reasonable short course, but complete with sample code
Part 1
Part 2
These articles will definitely get you started.
December 13, 2008 at 2:42 pm
Thanks for thta.. also looking for the Quartile? Don;t know what that means neither the requestor in company?
Thanks
Pat
December 13, 2008 at 6:44 pm
If my statistics courses did not leave me .... this is about it
first quartile (designated Q1) = lower quartile = cuts off lowest 25% of data = 25th percentile
second quartile (designated Q2) = median = cuts data set in half = 50th percentile
third quartile (designated Q3) = upper quartile = cuts off highest 25% of data, or lowest 75% = 75th percentile
The difference between the upper and lower quartiles is called the interquartile range.
December 14, 2008 at 10:46 am
how can i put it in to SQL now!!
December 14, 2008 at 1:42 pm
Read this article, follow its sample T-SQL code, be sure to scroll down to the explanation for "NTile" and I believe a value of 4 will provide you what you want.
http://searchsqlserver.techtarget.com/tip/0,289483,sid87_gci1320303,00.html
Then come back with your code, table structure, sample data as per the article in my signature block if you have additional questions.
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply