SELECT Date(mydate),sum(price),username from shop_table where Date(mydate)>'2011-01-07' GROUP BY Date(mydate),username Because the dates include the time, I convert them into 'only date' using Date() ...
###covert into the date format set sql_safe_updates =0; update new_data set order_date=date_format(str_to_date(order_date,'%m/%d/%Y'),'%Y-%m-%d'); ###now fn SELECT ...