Skip to content

Instantly share code, notes, and snippets.

@onli
Last active December 27, 2025 16:21
Show Gist options
  • Select an option

  • Save onli/211f3b2fab59cb30dc46e21d3fa3bf94 to your computer and use it in GitHub Desktop.

Select an option

Save onli/211f3b2fab59cb30dc46e21d3fa3bf94 to your computer and use it in GitHub Desktop.
Count how many articles were published in a Serendipity blog in a specific category after a timstamp (here: 1.1.2025)
SELECT category_name, COUNT(*) as amount FROM serendipity_entries INNER JOIN serendipity_entrycat ON serendipity_entries.id = serendipity_entrycat.entryid INNER JOIN serendipity_category ON serendipity_entrycat.categoryid = serendipity_category.categoryid WHERE timestamp > unixepoch('2025-01-01 00:00:01') GROUP BY category_name ORDER BY amount;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment