users by rep, LastAccessDate and posts

1

Please login or register to vote for this query.

(click on this box to dismiss)

Programming Language Design and Implementation

Q&A for designers and implementers of computer programming languages

with aleastonepostusers as (select LastAccessDate, Reputation, COUNT(*) as 'count' from Users u
JOIN posts p
ON p.owneruserid = u.id
GROUP BY u.id, u.LastAccessDate, u.Reputation
HAVING COUNT(*) >= 1)

(select 'users below 15 rep', count(*) from aleastonepostusers
where DATEDIFF(DAY, LastAccessDate, cast('2015-10-06' as datetime)) < 0
and Reputation < 15
)
union
(
select 'users at or above 15 rep', count(*) from aleastonepostusers
where DATEDIFF(DAY, LastAccessDate, cast('2015-10-06' as datetime)) < 0
and Reputation >= 15
)

Enter Parameters

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