Solved scratch query

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

-- Reworked by Deduplicator
-- Use of `collate` suggested by Rene

with candidates as (
  select postid, max(id) historyid
  from posthistory
  where posthistorytypeid = 4
  group by postid
)
select p.lastactivitydate [Last Active], p.viewcount
from candidates
join posts p on p.id = postid
join posthistory h on h.id = historyid
where upper(Title) like '%[\[(<]SOLVED[\])>]%' escape '\'
or Title like 'SOLVED%-%' collate SQL_Latin1_General_CP1_CI_AI
or Title like '%[\[(<]FIXED[\])>]%' escape '\' collate SQL_Latin1_General_CP1_CI_AI
or Title like 'FIXED %-%' collate SQL_Latin1_General_CP1_CI_AI
or Title like '%[\[(<]ANSWERED[\])>]%' escape '\' collate SQL_Latin1_General_CP1_CI_AI
or Title like 'ANSWERED%-%' collate SQL_Latin1_General_CP1_CI_AI
or Title like '%[\[(<]UPDATED[\])>]%' escape '\' collate SQL_Latin1_General_CP1_CI_AI
or Title LIKE 'UPDATED%-%' collate SQL_Latin1_General_CP1_CI_AI
order by lastactivitydate asc

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results