DECLARE @ThrowawayAccounts as int SET @ThrowawayAccounts ...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Retrocomputing

Q&A for vintage-computer hobbyists interested in restoring, preserving, and using the classic computer and gaming systems of yesteryear

DECLARE @ThrowawayAccounts as int
SET @ThrowawayAccounts = (
  SELECT COUNT(*) FROM Users WHERE CreationDate = LastAccessDate AND CreationDate < dateadd(d,datediff(d,0, getdate()),-1)
)

DECLARE @UnrepAccounts as int
SET @UnrepAccounts = (
  -- There must be a better way of doing this!
  SELECT COUNT(*) FROM Users WHERE Reputation = 1 OR Reputation = 101
)

DECLARE @UnpostedAccounts as int
SET @UnpostedAccounts = (
  SELECT COUNT(DISTINCT u.Id) FROM Users as u, Posts as p WHERE u.AccountId = p.OwnerUserId
)

PRINT @ThrowawayAccounts
PRINT @UnrepAccounts
PRINT @UnpostedAccounts

Enter Parameters

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