with UP as ( select u.Id UID, u.CreationDate UCD, p.Id PI...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Mythology Meta

Q&A about the site for enthusiasts and scholars of mythology and folklore

with UP as (
select u.Id UID, u.CreationDate UCD, p.Id PID, p.Creationdate PCD, ph.CreationDate phCD
from Users u inner join Posts p on u.Id = p.OwnerUserId
inner join PostHistory ph on ph.PostId = p.Id
where u.CreationDate >= '2019-01-01' and u.CreationDate < '2020-01-01'
and ph.PostHistoryTypeId = 12
and p.CreationDate = 
(select min (Creationdate) from Posts p2 where p2.OwnerUserId = u.Id)
and p.PostTypeId = 1
)
select count (distinct up2.UID)
from UP up2 
where 
not exists (select * from Posts p2 where p2.CreationDate > up2.phCD and p2.OwnerUserId = up2.UID and p2.PostTypeId = 1)

Enter Parameters

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