Member-only story
Window Function windowing options — with examples in PostgreSQL
More window functions here on the blog? What can I say? The deeper I get into them, the more I realize their power. Yet, I have not covered any of the Windowing options available in the clause so far and that ends with this post. I will share what I have learned, and what I am still learning. Join me and we can learn together…
Note: All data, names or naming found within the database presented in this post, are strictly used for practice, learning, instruction, and testing purposes. It by no means depicts actual data belonging to or being used by any party or organization.
OS and DB used:
- Xubuntu Linux 18.04.2 LTS (Bionic Beaver)
- PostgreSQL 11.2
Self-Promotion:
If you enjoy the content written here, by all means, share this blog and your favorite post(s) with others who may benefit from or like it as well. Since coffee is my favorite drink, you can even buy me one if you would like!
I’ll use a couple of tables from the PostgreSQL practice DVD Rental database for the example queries below.
Throughout this post, let’s assume we have this CTE that returns the below query results:
WITH valued_customers AS (
SELECT
c.first_name AS…