谁能帮我把学生的分数分成五分之一?我认为 SQL Server 2012 中有一个功能,但我们仍然有t upgraded to it as we are using 2008R2. I tried
Ntile(5)`,但它没有产生所需的结果。我需要在 Quintile 列下方
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