Q&A for Drupal developers and administrators
SELECT c.postid ,c.text ,ROW_NUMBER () OVER (ORDER BY (c.creationdate) DESC) AS rn FROM comments c