FIRST CONTACT

0

Please login or register to vote for this query.

(click on this box to dismiss)

you were the first commenter on a new user's first question

Science Fiction and Fantasy

Q&A for science fiction and fantasy enthusiasts

select
  p.id as qID,
  p.owneruserid as Asker,
  c.id as cID,
  c.userid as Commenter,
  p.score as qScore,
  p.viewcount as qViews,
  case when closeddate is null then '' else 'closed' end as closed,
  case when deletiondate is null then '' else 'deleted' end as deleted,
  row_number() over (partition by p.owneruserid order by p.id, c.id) as rownum
into #temp from postswithdeleted p 
  left outer join comments c on p.id=c.postid
where 
  p.posttypeid=1 
  and p.owneruserid is not null 
  and c.userid is not null
  and c.userid=##UserID##
order by p.id, c.id 

select *
from #temp
where rownum = 1

Enter Parameters

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