NTILE delete

0

Please login or register to vote for this query.

(click on this box to dismiss)

Cognitive Sciences Meta

Q&A about the site for practitioners, researchers, and students in cognitive science, psychology, neuroscience, and psychiatry

declare @T table
(
  SMSUsage int
)

insert into @T
select number
from master..spt_values
where type = 'P' and
      number between 1 and 20
      
;with C as
(
  select ntile(20) over(order by SMSUSage) as nt
  from @T       
)      
delete from C
where nt in (1,20)
      
select *
from @T

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results