วิธีการโพสต์ค่าโดยสาร ตาม DOW และประเภทการโพสต์ ไม่จำเป็นต้องใช้ตารางทั้งหมด
How posts fare, by DOW and post type.It is not neccessary to use all the tables.
 TagSynonyms:  Id [ number]  SourceTagName [ text]  TargetTagName [ text]  CreationDate [ time]  OwnerUserId [ number]  AutoRenameCount [ number]  LastAutoRename [ time]  Score [ number]  ApprovedByUserId [ number]  ApprovalDate [ time] 
SELECT TIME_TO_STR(CreationDate, '%W') AS dow, TIME_TO_STR(CreationDate, '%A') AS dowName, 1.0 * COUNT(all AS ClosedDate) / COUNT(*) AS fractionThatHaveBeenClosed, (SELECT MAX(CASE WHEN rownum * 1.0 / numrows <= 0.9 THEN Score END) FROM (SELECT Score, ROW_NUMBER() OVER (ORDER BY Score) AS rownum, COUNT(*) OVER (PARTITION BY NULL) AS numrows FROM Posts WHERE TIME_TO_STR(CreationDate, '%W') = TIME_TO_STR(p.CreationDate, '%W') AND PostTypeId = p.PostTypeId) AS t) AS medianScore, CASE PostTypeId WHEN 1 THEN 'Q' WHEN 2 THEN 'A' END AS postType FROM Posts AS p WHERE PostTypeId < 3 GROUP BY TIME_TO_STR(CreationDate, '%W'), TIME_TO_STR(CreationDate, '%A'), PostTypeId ORDER BY PostTypeId, dow