Skip to content

Instantly share code, notes, and snippets.

@onli
Last active December 20, 2022 14:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save onli/211f3b2fab59cb30dc46e21d3fa3bf94 to your computer and use it in GitHub Desktop.
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.2022)
SELECT category_name, COUNT(*) as amount FROM serendipity_entries INNER JOIN serendipity_entrycat ON serend
ipity_entries.id = serendipity_entrycat.entryid INNER JOIN serendipity_category ON serendipity_entrycat.categoryid
= serendipity_category.categoryid WHERE timestamp > 1640995201 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