adds query by date and eventgroup