Запрос, группированный по сумме
SELECT author, SUM(words) AS total_words FROM books GROUP BY author HAVING total_words > 1000000;