title: MySQL select last six moths, then the last years
body: <p>I  have an MySQL database for a blogpage I am working on. I would need a bit of help to realize the archive Menu I have in mind.</p>
  
  <p>the DB has a column titled "Date" as a timestamp format. I want to select the last six months in which an article was published. My question is, how i could select the last six entries from the "Date" column, that have a different month value. The query should ignore the date and the time, only the month matters.</p>
  
  <p>One idea I had, was to add another column to the DB that only stores the year and the month values. Of these I could do "Select Distinct from "MonthYear" limit 6; Would you agree that that works?</p>
  
  <p>After I selected those months, for all the older articles I want to do the same for years. How could I select all years in which articles were posted, except the years that are allready covered by the previous monthwise selection?</p>
  
  <p>Sorry if the question is a bit confusing, I hope you understand it and can help me.</p>