Find your answer statistics

0

Please login or register to vote for this query.

(click on this box to dismiss)

スタック・オーバーフローMeta

プログラマーと熱狂的なプログラマーのためのサイトに関する質問と回答

SELECT *
FROM (
SELECT 
    PostLenRank = Row_Number() OVER (ORDER BY avg(len(p.Body)) DESC),
    TotalPostRank = Row_Number() OVER (ORDER BY Count(*) DESC),
    StDevRank= Row_Number() OVER (ORDER BY stdev(len(p.Body)) DESC),
    TotalPostLengthRank = Row_Number() OVER (ORDER BY sum(len(p.Body)) DESC),
    LongestPostRank = Row_Number() OVER (ORDER BY max(len(p.Body)) DESC), 
    UserId = p.OwnerUserId,
    Username = Min(u.DisplayName),
    Total_Posts = Count(*),
    Average_Length_Of_Posts = avg(len(p.Body)),
    Total_Length_Of_Posts = sum(len(p.Body)),
    Longest_Post = max(len(p.Body)),
    Standard_Deviation_Of_Post_Lengths = stdev(len(p.Body)),
    Total_Rep = Min(u.Reputation),
    Rep_Per_Character = Min(Convert(float, u.Reputation)) / sum(len(p.Body))
FROM Posts p
INNER JOIN Users u ON
    u.Id = p.OwnerUserId
WHERE
    p.PostTypeId = 2 
GROUP BY
    p.OwnerUserId
    ) f
WHERE 
    UserId = ##SomeonesUserId##

Enter Parameters

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