select u.Id as UserID, format(u.CreationDate, 'yyyy-MM-dd...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Home Improvement

Q&A for contractors and serious DIYers

select u.Id as UserID,
format(u.CreationDate, 'yyyy-MM-dd') as UserCreateDate,
format(min(p.CreationDate), 'yyyy-MM-dd') as JanuaryFirstPostDate,
format(max(p.CreationDate), 'yyyy-MM-dd') as JanuaryLastPostDate,
count(*) as JanuaryPostCount
from Users u
join Posts p on u.Id = p.OwnerUserId
where format(u.CreationDate, 'yyyy-MM-dd') = '2021-12-23'
and p.CreationDate between '2022-01-01' AND '2022-01-31'
group by u.Id, format(u.CreationDate, 'yyyy-MM-dd')
order by JanuaryPostCount desc;

Enter Parameters

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