WITH FewRows AS ( SELECT * /* RANK() OVER (ORDER BY View...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Materials Modeling Meta

Q&A for materials modelers and data scientists

WITH FewRows AS (
SELECT *
/*  RANK() OVER (ORDER BY ViewCount DESC) AS ViewsRank,  */
  FROM Posts
  WHERE PostTypeId = 1 AND OwnerUserId BETWEEN 100 AND 200
 
 ) 
  SELECT OwnerUserId, ViewCount, RANK() OVER(
       /*              PARTITION BY OwnerUserId */
                     ORDER BY ViewCount DESC
                     ) AS ViewsRank, *
  FROM FewRows;

Enter Parameters

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