title: Why do WHERE and HAVING exist as separate clauses in SQL?
body: <p>I understand the distinction between <code>WHERE</code> and <code>HAVING</code> in a SQL query, but I don't see why they are separate clauses. Couldn't they be combined into a single clause that could handle both aggregated and non-aggregated data?</p>