A query for results based on date range
Your first resultset comes from

... WHERE updated_at &gt;= ...
      AND updated_at &lt;  ...


Your second resultset comes from adding this on

... GROUP BY DATE(updated_at)


The third ("weekly") gets trickier:

... GROUP BY FLOOR(TO_DAYS(updated_at) - 2) / 7


(Where the "-2" is adjusted to make a "week" start on Sunday or Monday or whatever you prefer.)

Yearly:

... GROUP BY YEAR(updated_at)


Monthly:

... GROUP BY LEFT(updated_at, 7)


(because the LEFT will give you something like the string "2011-03").