train: select filename, project, count(*) as bug_count from bug b join bug_bug_patch bbp on bbp.bug_id = b.id join bug_patch bp on bp.id = bbp.bug_patch_id join bug_file bf on bp.id = bf.bug_patch_id group by project, filename order by bug_count desc;