SELECT ... FROM ... WHERE ... GROUP BY MONTH( datetime )
SELECT ... FROM ... WHERE ... GROUP BY DATE_FORMAT( datetime, '%m' )
SELECT ... FROM ... WHERE YEAR( datetime ) = 2014 GROUP BY MONTH( datetime )
SELECT ... FROM ... GROUP BY EXTRACT( YEAR_MONTH FROM datetime )
SELECT ... FROM ... GROUP BY DAYOFMONTH( datetime )
<?php
$data = 'Something stupid, ul_tra-sh.op@tut.by.ru.wio something stupid';
echo $data . '<br>';
$data = preg_replace( '/\s([a-zA-Z0-9\.\-\_]+@[a-zA-Z0-9\.\-\_]+\.\w+)\s+/', ' ', $data );
echo $data . '<br>';
?>
Something stupid, ul_tra-sh.op@tut.by.ru.wio something stupid
Something stupid, something stupid