Q&A about the site for enthusiasts and power users of the Android operating system
SELECT posts.Id, posts.AcceptedAnswerId, posts.ParentId, posts.CreationDate, posts.DeletionDate, posts.Score, posts.ViewCount, posts.Body, posts.OwnerUserId, posts.OwnerDisplayName, posts.LastEditorUserId, posts.LastEditDate, posts.LastActivityDate, posts.Title, posts.Tags, posts.AnswerCount, posts.CommentCount, posts.FavoriteCount, posts.ClosedDate, posts.CommunityOwnedDate, types.Name AS "PostType" FROM Posts AS posts JOIN ( SELECT TOP 100 Id FROM Posts WHERE PostTypeId = 1 --Find only questions AND (CreationDate >= ##DateBegin## AND CreationDate < ##DateEnd##) -- DateBegin: Starting datetime (YYYY-MM-DD) -- DateEnd: Ending datetime (YYYY-MM-DD) ) AS ids ON posts.Id = ids.Id OR posts.ParentId = ids.Id JOIN PostTypes AS types ON posts.PostTypeId = types.Id WHERE PostTypeId = 1 OR PostTypeId = 2