I have a query like:
SELECT
EXTRACT(WEEK FROM j.updated_at) as "week", count(j.id)
FROM jobs
WHERE
EXTRACT(YEAR FROM j.updated_at)=2009
GROUP BY EXTRACT(WEEK FROM j.updated_at)
ORDER BY week
Which works fine, but I only want to show the last say 12 weeks, LIMIT 12 works, but only gives me the first twelve and I need the order to be in sequential week order (ie. not reversed) for charting purposes...
Is there a equivalent statement in Postgresql such as Show BOTTOM x items?