sample PHP query of kb-log-dump database
moved aggregate func into DB class