/*
Qual seria a consulta, usando sub-consulta, que seria equivalente a:
SELECT CPF, COUNT(*) FROM [NOTAS FISCAIS]
WHERE YEAR(DATA) = 2016
GROUP BY CPF
HAVING COUNT(*) > 2000
*/
SELECT NF.CPF, NF.CONTADOR FROM
(SELECT CPF, COUNT(*) AS CONTADOR
FROM [NOTAS FISCAIS]
WHERE YEAR([DATA]) = 2016
GROUP BY CPF) NF
WHERE NF.CONTADOR > 2000