;with taghistory as ( select id , creationdate , userid a...

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

;with taghistory as (
select id
     , creationdate
     , userid as [User Link] 
from posthistory
where posthistorytypeid in (3,6)
and text like '%<##tag##>%'
),
toptag as (
  select min(creationdate) as [created]
  from taghistory
),
toprecord as (
  select *
  from taghistory
  where creationdate = (select created from toptag)
)


select *
from toprecord

Enter Parameters

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