Skip to content
Advertisement

SQL grouping by month and year

I’m not sure what should I write in the following SQL query to show ‘date’ column like this: “month-year” – “9-2011”.

So, what I want to do is to change the data from the first column to show month and year instead of showing month only.

Advertisement

Answer

Or as @40-Love mentioned you can cast with leading zeroes:

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement