[reports] Filter entries using raw sql.