Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 12890

How can I group student scores into quintile using SQL Server 2008

$
0
0

Can anyone help me to group student scores into quintile. I think there is a feature in SQL Server 2012, but still we are have not upgrade to it as we are using 2008R2. I tried Ntile(5) but it not generating the desired result. I need below Quintile column

Student Score Quintile

Student1 20 1

Student2 20 1

Student3 30 2

Student4 30 2

Student5 40 2

Student6 40 2

Student7 50 3

Student8 50 3

Student9 60 3

Student10 70 4

Student11 70 4

Student12 80 4

Student13 80 4

Student14 90 5


Viewing all articles
Browse latest Browse all 12890

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>