fixed lunch statistics, using new database connection interface