select count(*) as NumOfUsers from Users where Users.Disp...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Quantitative Finance

Q&A for finance professionals and academics

select
count(*) as NumOfUsers
from Users
where Users.DisplayName = 'Mat Mannion'

select
avg(Age) as AverageAge,
count(*) as UsersOfAverageAge
from Users
where Age = (select avg(Age) from Users)

select
year(CreationDate) as YearCreated,
count(*) as NumOfUsers
from Users
where CreationDate >= '2010-01-01 00:00'
group by year(CreationDate)

select
count(*) as NumOfPosts
from Posts
inner join Users on Users.Id = Posts.OwnerUserId
inner join PostTypes on Posts.PostTypeId = PostTypes.Id
where Users.DisplayName = 'Mat Mannion'
and PostTypes.Name = 'Question'

select top 1
Id as UserId,
DisplayName
into #Staging
from Users
where Location like '%South Africa%'
order by Reputation desc
select
#Staging.DisplayName as [User],
count(*) as NumOfBadges
from Badges
inner join #Staging on #Staging.UserId = Badges.UserId
where Date between '2016-01-01' and '2016-12-31'
and Badges.Name = 'Enlightened'
group by #Staging.DisplayName
drop table #Staging

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results