ดู CreationDate ของบันทึกการโหวตล่าสุดต่อ VoteTypeId.. ไม่จำเป็นต้องใช้ตารางทั้งหมด
See the CreationDate of the most recent Vote record per VoteTypeId..It is not neccessary to use all the tables.
 PostNoticeTypes:  Id [ number]  ClassId [ number]  Name [ text]  Body [ text]  IsHidden [ boolean]  Predefined [ boolean]  PostNoticeDurationId [ number] 
WITH summary AS (SELECT VoteTypeId, CreationDate, ROW_NUMBER() OVER (PARTITION BY VoteTypeId ORDER BY CreationDate DESC) AS r FROM Votes) SELECT VoteTypeId, CreationDate FROM summary WHERE r = 1 ORDER BY VoteTypeId