From: "T. H. Grejc" > I'm creating news archive and it should be sorted by months: > > January 2004 (news count is 56) > February 2004 (48) > ... So you need to use GROUP BY and COUNT.
The format is like this: select monthandyear,count(othercolumn) from t group by monthandyear in your case monthandyear must be replaced by your function which extracts month and year from the unix timestamp column (in both the select and group by). I think that's what you needed. John -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]