I have a table with two fields - datetime and int. I want to do a group by on the datetime only on the date ignoring the hour and minute.
datetime
int
SELECT CAST(Datetimefield AS DATE) as DateField, SUM(intfield) as SumField FROM MyTable GROUP BY CAST(Datetimefield AS DATE)