select id , cast(creationdate as date) as cdate , posttyp...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Skeptics

Q&A for scientific skepticism

select id
       , cast(creationdate as date) as cdate
       , posttypeid
       , datediff(DAY , creationdate, deletiondate)
       , deletiondate
       , case when (deletiondate <= '2023-12-03' and parentid is not null) then 'Ans'
              when (deletiondate <= '2023-12-03' and parentid is null) then 'Que'
              else 'Ali'
              end as dreason
   from postswithdeleted
   where creationdate<= '2023-12-03'
  and posttypeid in ('1', '2')
  and deletiondate is not null
;

Enter Parameters

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