Q&A about the site for administrators, end users, developers and designers for Craft CMS
SELECT Posts.OwnerUserId, Posts.Id, PostHistory.CreationDate, PostHistoryTypeId, UserId FROM PostHistory, Posts WHERE Posts.Id = PostHistory.PostId AND PostHistoryTypeId in (12, 13) AND UserId in (13531, 102937,106224,16587,19679,59303,168175,707111, 256196,229044,100297,1252759,3093387,871050,1849664,476,541136,4099593,189134, 366904,3956566,584192,563532,2057919) AND UserId != Posts.OwnerUserId And Posts.OwnerUserId Is Not null ORDER BY PostHistory.CreationDate, Posts.OwnerUserId