Question
How to group by year
Hi,
I have the following simple query:
SELECT pubdate, title
FROM table
ORDER BY date DESC
Which returns hundreds of records. Instead of outputing every single date within a year for pubdate, I would like to group the output based on the year. So the display would like something like:
2008
2007
2006
...
1970 etc.
How can I output this?
I have the following simple query:
SELECT pubdate, title
FROM table
ORDER BY date DESC
Which returns hundreds of records. Instead of outputing every single date within a year for pubdate, I would like to group the output based on the year. So the display would like something like:
2008
2007
2006
...
1970 etc.
How can I output this?
