When GROUP BY is not used, HAVING behaves like a WHERE clause.” The difference between where and having: WHERE filters ROWS while HAVING filters groups.
SELECT SUM(spending) as totSpending
FROM militaryspending
HAVING SUM(spending) > 200000;
Output:
totSpending
1699154.3