Users over [min reputation] threshold that logged in in the past week relative to number of votes

0

Please login or register to vote for this query.

(click on this box to dismiss)

Motor Vehicle Maintenance and Repair Meta

Q&A about the site for mechanics and DIY enthusiast owners of cars, trucks, and motorcycles

declare @voted float = ##Voted:int?1##;
declare @minRep int = ##MinRep:int?150##;
declare @offset datetime = dateadd(day, -7, getdate());

select
  @voted as [Voted],
  count(id) as [Eligible],
  format((@voted / cast(count(id) as float) * 100), 'N2') + '%' as [Percentage]
from
  users
where
  (1=1)
  and reputation >= @minRep
  and LastAccessDate >= @offset

Enter Parameters

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