def get_slowest_files(cls, num=10):
        """Returns the slowest num files.
        
        :param num: The maximum number of results to be returned
        :type num: int
        
        """
        cur = cls.get_cursor()
        q = (
            "SELECT file, SUM(elapsed) as sum_elapsed FROM {} GROUP BY file"
            " ORDER BY sum_elapsed DESC LIMIT {}"
        )
        cur.execute(q.format(cls.meta['table'], num))
        result = cur.fetchall()
        # Don't return the weird invalid row if no tests were run
        if not all([cls.is_valid_row(x) for x in result]):
            return []
        return result
Returns the slowest num files.
        
        :param num: The maximum number of results to be returned
        :type num: int