to : nemonoman
thanks that really help and for the stat per day
select SUM( hit )totalhits,date_ref from stat where DATE_FORMAT( date_ref, '%Y%m' )=200505 group by DATE_FORMAT( date_ref, '%Y%m%d' )order by date_ref
this works perfect, You are my savior