Please login or register to vote for this query.

(click on this box to dismiss)

Audio-Video Production Meta

Q&A about the site for engineers, producers, editors, and enthusiasts spanning the fields of video, and media creation

declare @NumberOfStudents int
declare @StudentsPerGroup int

set @StudentsPerGroup = 10
set @NumberOfStudents = 104

select number, ntile((@NumberOfStudents / @StudentsPerGroup)+1) over(order by number) as GroupID
from master..spt_values
where type = 'P' and
      number between 1 and 104

Enter Parameters

Switch sites:
loading Hold tight while we fetch your results