Add a DB function for retrieving daily summaries.