Eerste dag van de maand:
SELECT DATE_FORMAT('2007-07-12', '%Y-%m-01');
output:2007-07-01
Eerste dag van de week:
SELECT DATE_SUB('2007-07-12', INTERVAL DAYOFWEEK('2007-07-12')-1 DAY);
output:2007-07-08
MySQL-referentie:http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html#function_date-add