WITH ctePromo AS ( Select p.Id as Id, ROW_NUMBER() OVER(...


Please login or register to vote for this query.

(click on this box to dismiss)

Spanish Language

Q&A for linguists, teachers, students and Spanish language enthusiasts in general wanting to discuss the finer points of the language

  ctePromo AS

p.Id as Id,
--DateDiff(day, u.CreationDate, getdate()) as DateDiff, 
ROW_NUMBER() OVER(PARTITION BY u.Id ORDER BY p.CreationDate ) as Promo_Level
from Posts p
LEFT JOIN Comments c
on p.Id=c.PostId
Left JOIN Users u
on c.UserId=u.Id
where DateDiff(day, u.CreationDate, getdate()) >(365*2)
--u.CreationDate > dateadd(year,2,getdate())

from ctePromo
where Promo_Level=10

Enter Parameters

Switch to meta site
loading Hold tight while we fetch your results