Statistics grouped by file, flag