Skip to content

Instantly share code, notes, and snippets.

@mmurray
Created November 21, 2010 05:55
Show Gist options
  • Save mmurray/708498 to your computer and use it in GitHub Desktop.
Save mmurray/708498 to your computer and use it in GitHub Desktop.
select distinct extract(month from created_at)||' '||extract(year from created_at), extract(month from created_at), extract(year from created_at) from articles
MYSQL:
select distinct concat(month(created_at),' ',extract(year from created_at)) as date, month(created_at) as month, year(created_at) as year from articles
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment