คำถามและคำตอบสัปดาห์นี้ ไม่จำเป็นต้องใช้ทุกตาราง
Questions and answers this week.It is not neccessary to use all the tables.
 PendingFlags:  Id [ number]  FlagTypeId [ number]  PostId [ number]  CreationDate [ time]  CloseReasonTypeId [ number]  CloseAsOffTopicReasonTypeId [ number]  DuplicateOfQuestionId [ number]  BelongsOnBaseHostAddress [ text] 
SELECT (SELECT COUNT(*) FROM Posts WHERE PostTypeId = 1 AND CreationDate >= @lastWeek) AS "number_of_questions", (SELECT COUNT(*) FROM Posts WHERE PostTypeId = 2 AND CreationDate >= @lastWeek) AS "number_of_answers", (SELECT COUNT(*) FROM Votes WHERE VoteTypeId = 2 AND CreationDate >= @lastWeek) AS "number_of_upvotes"