Failed to execute the SQL query

 select  UNIX_TIMESTAMP( ifnull(i.pubdate, i.added)) as ts_,  year( ifnull(i.pubdate, i.added)) as y_,  month( ifnull(i.pubdate, i.added)) as m_,  count(*) as cnt_  from  item  i  where  UNIX_TIMESTAMP(ifnull(i.pubdate, i.added)) < 1338447600  and cid=11  and not(i.unread & 4)  group by y_,m_ order by ts_ desc limit 4

Error 1055: Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'gregarius.i.pubdate' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by