Advertisement
Guest User

Untitled

a guest
May 6th, 2015
368
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 0.23 KB | None | 0 0
  1. select count(1) as count, month(published_at) as month, year(published_at) as year
  2. from articles
  3. where published_at >= (now() - interval 1 year) and published_at <= now()
  4. group by month(published_at)
  5. order by year asc, month asc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement