WITH comment_ranks AS( SELECT cm.Id, cm.PostId, cm.Creati...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Physical Fitness

Q&A for physical fitness professionals, athletes, trainers, and those providing health-related needs

WITH comment_ranks AS(
SELECT cm.Id, cm.PostId, cm.CreationDate,
       RANK() OVER (
       PARTITION BY cm.PostId
       ORDER BY cm.CreationDate DESC ) cmt_rank
FROM comments cm
)
SELECT *
  FROM comment_ranks
WHERE cmt_rank <= 100;

Enter Parameters

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