WITH predvyber AS ( SELECT Users.Id, Users.DisplayName, P...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow Meta en español

Preguntas y respuestas sobre el sitio para programadores y profesionales de la informática

WITH predvyber AS (
  SELECT
    Users.Id,
    Users.DisplayName,
    Posts.Title,
    Posts.CreationDate,
    Posts.ViewCount
  FROM
    Posts
  JOIN
    Users ON Posts.OwnerUserId = Users.Id
  WHERE
    Posts.PostTypeId = 1
    AND Posts.CreationDate > '2023-11-01'
    AND Posts.ViewCount > 1
  ORDER BY
    Users.Id,
    Posts.ViewCount DESC
  OFFSET 0 rows
)

SELECT
  predvyber.*
FROM
  predvyber
WHERE
  (SELECT
     COUNT(*)
   FROM
     predvyber AS pocitadlo
   WHERE
     pocitadlo.Id = predvyber.Id
  ) < 4
ORDER BY
  predvyber.Id,
  predvyber.ViewCount DESC;

Enter Parameters

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