SELECT
SUB.CPF,
SUB.QTD
FROM (
SELECT CPF, COUNT(*) AS QTD
FROM notas_fiscais
WHERE YEAR(DATA_VENDA) = 2016
GROUP BY CPF
HAVING COUNT(*) > 2000
) AS SUB
SELECT
SUB.CPF,
SUB.QTD
FROM (
SELECT CPF, COUNT(*) AS QTD
FROM notas_fiscais
WHERE YEAR(DATA_VENDA) = 2016
GROUP BY CPF
HAVING COUNT(*) > 2000
) AS SUB
Olá, Rodolfo, tudo bem?
Mandou muito bem resolvendo o desafio proposto.
Continue assim e bons estudos!