-- ## 10: All tickets closed in the last month ## -- -- based on: -- http://groups.google.com/group/trac-users/browse_thread/thread/c3452e8656af5988/62c9ebdee6ec91ea?hl=en&lnk=gst&q=datetime#62c9ebdee6ec91ea SELECT DISTINCT id AS ticket, time, owner, version, milestone, resolution, status FROM ticket t WHERE status IN ('closed') AND time >= (select strftime ("%s", "now", "-1 month")) ORDER BY time