key_commit: Created table function for collections by year and month