SELECT * FROM (select LAG(h.text) over (order by h.Creat...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

SELECT *

FROM (select 
LAG(h.text) over (order by h.CreationDate) old_title,
h.text new_title,
u.DisplayName


FROM Posts p 
lEft JOIN PostHistory h 
ON p.id = h.postId
JOIN PostHistoryTypes ht 
ON h.posthistorytypeId = ht.id
JOIN Users u
ON u.id = h.userId
where
p.id= 2433
AND ht.id in (1,4,7)
) q

where

old_title not like '%Who%'
AND old_title not like '%What%'
AND old_title not like '%When%'
AND old_title not like '%Where%'
AND old_title not like '%Why%'
AND old_title not like '%How%'
AND old_title not like '%Can%'
AND old_title not like '%Is%'
AND old_title not like '%Which%'
AND old_title not like '%Was%'
AND old_title not like '%Are%'
AND old_title not like '%Has%'
AND old_title not like '%Will%'
AND old_title not like '%Do%'
AND old_title not like '%?%'

Enter Parameters

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