Upvotes per user


Please login or register to vote for this query.

(click on this box to dismiss)

Super User

Q&A for computer enthusiasts and power users

-- Average number of upvotes per user

Declare @totalNumberOfUpvotes int
Declare @totalNumberOfUsers float
Declare @averageUpvotePerQuestion float

select @totalNumberOfUpvotes = sum(UpVotes) FROM Users 
select @totalNumberOfUsers = count(Id) from Users
select @averageUpvotePerQuestion = @totalNumberOfUpvotes / @totalNumberOfUsers 

select @averageUpvotePerQuestion as 'The average number of upvotes per user'

Enter Parameters

Switch sites:
loading Hold tight while we fetch your results