create table #temp1 ( userid int ) insert into #temp1 select 12 union all select 13 union all select 13 union all select 14 union all select 14 union all select 15 union all select 19 select * from #temp1 select userid,ntile(3) over(order by userid) as final from #temp1 --It randomly divides
No comments:
Post a Comment