Q&A about the site for mechanics and DIY enthusiast owners of cars, trucks, and motorcycles
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;