Simon Willison’s Weblog
Owned by simonw, visibility: Public
WITH monthly_posts AS ( SELECT EXTRACT(MONTH FROM be.created) as month_num, TO_CHAR(be.created, 'Month') as month_name, string_agg( ' - ' || EXTRACT(DAY FROM be.created)::integer || CASE WHEN EXTRACT(DAY FROM be.created)::integer %% 10 = 1 AND EXTRACT(DAY FROM be.created)::integer != 11 THEN 'st' WHEN EXTRACT(DAY FROM be.created)::integer %% 10 = 2 AND EXTRACT(DAY FROM be.created)::integer != 12 THEN 'nd' WHEN EXTRACT(DAY FROM be.created)::integer %% 10 = 3 AND EXTRACT(DAY FROM be.created)::integer != 13 THEN 'rd' ELSE 'th' END || ': [' || be.title || '](https://simonwillison.net/' || EXTRACT(YEAR FROM be.created) || '/' || TO_CHAR(be.created, 'Mon') || '/' || EXTRACT(DAY FROM be.created) || '/' || be.slug || '/)', E'\n' ORDER BY be.created ) as post_links FROM blog_entry be JOIN blog_entry_tags bet ON be.id = bet.entry_id JOIN blog_tag bt ON bet.tag_id = bt.id WHERE bt.tag = 'llms' AND EXTRACT(YEAR FROM be.created) = 2024 GROUP BY EXTRACT(MONTH FROM be.created), TO_CHAR(be.created, 'Month') ORDER BY month_num ) SELECT '- ' || trim(month_name) || E'\n' || post_links as output FROM monthly_posts
12 rows
Duration: 6.06ms