Skip to content

Instantly share code, notes, and snippets.

@felipelavinz
Last active August 29, 2015 14:05
Show Gist options
  • Save felipelavinz/7d723ab0af82584252cc to your computer and use it in GitHub Desktop.
Save felipelavinz/7d723ab0af82584252cc to your computer and use it in GitHub Desktop.
entradas publicadas por semana y tipo
SELECT
YEAR( post_date ) AS year,
MONTH( post_date ) AS month,
WEEK( post_date ) as week,
post_type
COUNT(ID) as posts
FROM
wpudd_posts
WHERE
post_status = 'publish'
GROUP BY
year, month, week, post_type
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment