PostgreSQL - The Difference Between HAVING and WHERE

Conan Mercer Applied Scientist

PostgreSQL - The Difference Between HAVING and WHERE

10 Jul 2021 - Conan Mercer

Motivation

This Jupyter Notebook is the fourth in my series on PostgreSQL, the previous blog post can be found here. The goal of this post is to explain the difference between the HAVING and WHERE statements in PostgreSQL. This guide uses a sample database called dvdrental, a common resource used to learn PostgreSQL, it can be downloaded from here.

This Jupyter Notebook also resides on my GitHub - it can be viewed from here

Conclusion

This post explained the crucial difference between the HAVING and WHERE statements in PostgreSQL.
In the future I will be writing more about PostgreSQL, with a focus on data science and techniques to gather specific information for further analysis.