Q&A for speakers of other languages learning English
DECLARE @Tag1 NVARCHAR(25) = ##Tag1:String?java##; DECLARE @Tag2 NVARCHAR(25) = ##Tag2:String?java##; DECLARE @Tag3 NVARCHAR(25) = ##Tag3:String?java##; DECLARE @SortOrder NVARCHAR(4) = ##SortOrder:String?DESC##; DECLARE @sql NVARCHAR(MAX) = N'SELECT DISTINCT [Post Link] = Posts.Id , [Creation Date] = Posts.CreationDate , [Tags] = Tags.TagName FROM Posts INNER JOIN PostTags ON Posts.Id = PostTags.PostId AND Posts.AnswerCount = 0 AND Posts.ClosedDate IS NULL INNER JOIN Tags ON Tags.Id = PostTags.TagId WHERE Tags.TagName IN (''' + @Tag1 + ''', ''' + @Tag2 + ''', ''' + @Tag3 + ''') ORDER BY Posts.CreationDate DESC'; select @sql;