Q&A about the site for students, teachers, and linguists wanting to discuss the finer points of the Italian language
SELECT usr.DisplayName ,pst.Id ,pst.CreationDate ,ROW_NUMBER() OVER (PARTITION by pst.OwnerUserID ORDER BY pst.CreationDate) as 'Sequence' ,LAG(pst.CreationDate) OVER (ORDER BY pst.Id) as PrevCreationDate ,LEAD(pst.CreationDate) OVER (ORDER BY pst.Id) as NextCreationDate -- ,COUNT(1) as NumberOfPosts FROM Posts pst Inner Join Users usr ON usr.Id = pst.OwnerUserId WHERE OwnerUserID in (9625673, 7364570) --GROUP BY usr.DisplayName ORDER BY pst.CreationDate ;