public LinkedList<String> getPopularDirectors(Date startDate, Date endDate, int amount) throws SQLException {
        PreparedStatement statement = connection.prepareStatement(
                "SELECT ISBN, SUM(Amount) FROM Orders WHERE Date>=? AND Date<=? GROUP BY ISBN");
        statement.setString(1, sqlDate.format(startDate));
        statement.setString(2, sqlDate.format(endDate));
        ResultSet resultSet = statement.executeQuery();

        HashMap<String, Integer> directors = new HashMap<String, Integer>();
        while (resultSet.next()) {
            Video video = getVideoFromISBN(resultSet.getString(1));
            for (String director : video.getDirectors()) {
                int popularity = resultSet.getInt(2);
                if (directors.containsKey(director)) {
                    popularity += directors.get(director);
                }
                directors.put(director, popularity);
            }
        }
        int max = 0;
        for (int value : directors.values()) {
            max = Math.max(max, value);
        }

        LinkedList<String> popularDirectors = new LinkedList<String>();
        while (popularDirectors.size() < amount || popularDirectors.size() < directors.size()) {
            for (String key : directors.keySet()) {
                if (directors.get(key) == max) {
                    popularDirectors.add(key);
                }
            }
            max--;
        }

        return popularDirectors;
    }