Posts containing some of the given texts in revision history


Please login or register to vote for this query.

(click on this box to dismiss)


Q&A for researchers, developers, students, teachers, and end users interested in bioinformatics

declare @links nvarchar(max) = ##links:string##
declare @list nvarchar(max)
declare @sql nvarchar(max)

select @list = string_agg(concat('(ph.Text LIKE ''%', value,'%'')'), ' OR ')
from string_split(@links, ',')

set @sql = concat(N'SELECT DISTINCT TOP 100 p.Id AS [Post Link], 
  p.OwnerUserId AS [User Link], p.CreationDate, p.LastActivityDate, p.Score,
  url = ''site://posts/'' + CAST(p.Id AS varchar)+''/revisions''
  FROM Posts p JOIN PostHistory ph ON (ph.PostId=p.Id)
  WHERE ',@list,N' ORDER BY p.CreationDate DESC')

print @sql


Enter Parameters

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