# Window Functions

Published articles for Window Functions.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## "Regex for Rows": Simplifying Pattern Detection in SQL with MATCH\_RECOGNIZE

DevFeed: ["Regex for Rows": Simplifying Pattern Detection in SQL with MATCH\_RECOGNIZE](<https://devfeed.tech/articles/regex-for-rows-simplifying-pattern-detection-in-sql-with-match-recognize-31401.md>)

Original publisher: [Read original article](<https://www.databricks.com/blog/regex-rows-simplifying-pattern-detection-sql-matchrecognize>)

Author: Kent Marten; Sergei Fedorov

Published: 2026-09-16T17:14:05Z

Content type: tutorial

Language: en

Sources: [Databricks](<https://devfeed.tech/sources/databricks.md>)

Topics: [SQL](<https://devfeed.tech/topics/sql.md>), [databricks](<https://devfeed.tech/topics/databricks.md>), [Cybersecurity](<https://devfeed.tech/topics/cybersecurity.md>), [Security & Privacy](<https://devfeed.tech/topics/security-privacy.md>)

Tags: [count](<https://devfeed.tech/tags/count.md>), [cybersecurity](<https://devfeed.tech/tags/cybersecurity.md>), [databricks](<https://devfeed.tech/tags/databricks.md>), [failed](<https://devfeed.tech/tags/failed.md>), [false-positives](<https://devfeed.tech/tags/false-positives.md>), [functions](<https://devfeed.tech/tags/functions.md>), [login](<https://devfeed.tech/tags/login.md>), [partition](<https://devfeed.tech/tags/partition.md>), [product](<https://devfeed.tech/tags/product.md>), [real-time](<https://devfeed.tech/tags/real-time.md>), [regex](<https://devfeed.tech/tags/regex.md>), [sql](<https://devfeed.tech/tags/sql.md>), [window-functions](<https://devfeed.tech/tags/window-functions.md>)

### AI overview

This tutorial explains how Databricks supports SQL MATCH_RECOGNIZE for detecting ordered event patterns. It shows how the clause can simplify sequence detection, including identifying repeated login failures followed by a successful login, compared with complex SQL queries and window functions.

### Source excerpt

Imagine you work in cybersecurity and you have a table that tracks login attempts...

## Waiting for PostgreSQL 19 - Add IGNORE NULLS/RESPECT NULLS option to Window functions.

DevFeed: [Waiting for PostgreSQL 19 - Add IGNORE NULLS/RESPECT NULLS option to Window functions.](<https://devfeed.tech/articles/waiting-for-postgresql-19-add-ignore-nulls-respect-nulls-option-to-window-functions-33665.md>)

Original publisher: [Read original article](<https://www.depesz.com/2025/10/13/waiting-for-postgresql-19-add-ignore-nulls-respect-nulls-option-to-window-functions/>)

Author: depesz

Published: 2025-10-13T11:13:52Z

Content type: article

Language: en

Sources: [select \* from depesz;](<https://devfeed.tech/sources/select-from-depesz.md>)

Topics: [PostgreSQL](<https://devfeed.tech/topics/postgresql.md>)

Tags: [first-value](<https://devfeed.tech/tags/first-value.md>), [functions](<https://devfeed.tech/tags/functions.md>), [ignore](<https://devfeed.tech/tags/ignore.md>), [lag](<https://devfeed.tech/tags/lag.md>), [last-value](<https://devfeed.tech/tags/last-value.md>), [lead](<https://devfeed.tech/tags/lead.md>), [nth-value](<https://devfeed.tech/tags/nth-value.md>), [null](<https://devfeed.tech/tags/null.md>), [nulls](<https://devfeed.tech/tags/nulls.md>), [pg19](<https://devfeed.tech/tags/pg19.md>), [postgresql](<https://devfeed.tech/tags/postgresql.md>), [uncategorized](<https://devfeed.tech/tags/uncategorized.md>), [waiting](<https://devfeed.tech/tags/waiting.md>), [window](<https://devfeed.tech/tags/window.md>), [window-functions](<https://devfeed.tech/tags/window-functions.md>)

### AI overview

The article describes a PostgreSQL patch adding IGNORE NULLS and RESPECT NULLS options, also called a null treatment clause, to the lead, lag, first_value, last_value, and nth_value window functions. IGNORE NULLS skips NULL values, while RESPECT NULLS remains the default behavior.

### Source excerpt

On 3rd of October 2025, Tatsuo Ishii committed patch: Add IGNORE NULLS/RESPECT NULLS option to Window functions. Add IGNORE NULLS/RESPECT NULLS option (null treatment clause) to lead, lag, first_value, last_value and nth_value window functions. If unspecified, the default is RESPECT NULLS which includes NULL values in any result calculation. IGNORE NULLS ignores NULL values. ... Continue reading "Waiting for PostgreSQL 19 - Add IGNORE NULLS/RESPECT NULLS option to Window functions."

## Emulating Window Functions in MySQL 5.7

DevFeed: [Emulating Window Functions in MySQL 5.7](<https://devfeed.tech/articles/emulating-window-functions-in-mysql-5-7-28938.md>)

Original publisher: [Read original article](<https://blog.jooq.org/emulating-window-functions-in-mysql-5-7/>)

Author: lukaseder

Published: 2023-01-20T11:07:00Z

Content type: tutorial

Language: en

Sources: [jOOQ](<https://devfeed.tech/sources/jooq.md>)

Topics: [MySQL](<https://devfeed.tech/topics/mysql.md>), [SQL](<https://devfeed.tech/topics/sql.md>), [Databases](<https://devfeed.tech/topics/databases.md>)

Tags: [dense-rank](<https://devfeed.tech/tags/dense-rank.md>), [deprecated](<https://devfeed.tech/tags/deprecated.md>), [emulations](<https://devfeed.tech/tags/emulations.md>), [local-variables](<https://devfeed.tech/tags/local-variables.md>), [mysql](<https://devfeed.tech/tags/mysql.md>), [mysql-5-7](<https://devfeed.tech/tags/mysql-5-7.md>), [ordering](<https://devfeed.tech/tags/ordering.md>), [rank](<https://devfeed.tech/tags/rank.md>), [row-number](<https://devfeed.tech/tags/row-number.md>), [sql](<https://devfeed.tech/tags/sql.md>), [window-functions](<https://devfeed.tech/tags/window-functions.md>)

### AI overview

This tutorial explains how to emulate window functions in MySQL 5.7 using user variables. It warns that the technique depends on incidental evaluation order, can break when query execution changes, and is deprecated in MySQL 8.x.

### Source excerpt

One of MySQL 8's biggest improvements is the support of window functions. As I always said in conferences, there's SQL before window functions and SQL after window functions. Once you start using them, you'll use them everywhere. Some of you poor souls are unfortunate enough to be stuck on MySQL 5.7, either of your own ... Continue reading Emulating Window Functions in MySQL 5.7 ->

## Postgres Thursday s01e04: Dimitri Fontaine. The Art of PostgreSQL; pg\_auto\_failover

DevFeed: [Postgres Thursday s01e04: Dimitri Fontaine. The Art of PostgreSQL; pg\_auto\_failover](<https://devfeed.tech/articles/postgres-thursday-s01e04-dimitri-fontaine-the-art-of-postgresql-pg-auto-failover-34648.md>)

Original publisher: [Read original article](<https://tapoueh.org/conf/postgres-thursday-s01e04-dimitri-fontaine.-the-art-of-postgresql-pg_auto_failover/>)

Published: 2020-11-01T22:00:00Z

Content type: article

Language: en

Sources: [Dimitri Fontaine](<https://devfeed.tech/sources/dimitri-fontaine.md>)

Topics: [PostgreSQL](<https://devfeed.tech/topics/postgresql.md>), [Availability](<https://devfeed.tech/topics/availability.md>), [Extension](<https://devfeed.tech/topics/extension.md>), [Processes](<https://devfeed.tech/topics/processes.md>)

Tags: [failover](<https://devfeed.tech/tags/failover.md>), [high-availability](<https://devfeed.tech/tags/high-availability.md>), [postgresql](<https://devfeed.tech/tags/postgresql.md>), [sql](<https://devfeed.tech/tags/sql.md>), [window-functions](<https://devfeed.tech/tags/window-functions.md>)

### AI overview

An interview with Dimitri Fontaine discusses The Art of PostgreSQL, including the practical use of window functions for ranking, running totals, and lead/lag comparisons. It also covers pg_auto_failover, a PostgreSQL high-availability extension that automates failover using a monitor process and a state machine for node roles.

### Source excerpt

In this interview we dive in my book The Art of PostgreSQL and then in the High Availability and automated failover solution that I work on, pg_auto_failover.

## How to Get the First or Last Value in a Group Using Group By in SQL

DevFeed: [How to Get the First or Last Value in a Group Using Group By in SQL](<https://devfeed.tech/articles/how-to-get-the-first-or-last-value-in-a-group-using-group-by-in-sql-33938.md>)

Original publisher: [Read original article](<https://hakibenita.com/sql-group-by-first-last-value>)

Author: Haki Benita

Published: 2019-08-12T21:00:00Z

Content type: tutorial

Language: en

Sources: [Haki Benita](<https://devfeed.tech/sources/haki-benita.md>)

Topics: [PostgreSQL](<https://devfeed.tech/topics/postgresql.md>), [SQL](<https://devfeed.tech/topics/sql.md>), [Databases](<https://devfeed.tech/topics/databases.md>)

Tags: [articles](<https://devfeed.tech/tags/articles.md>), [hash](<https://devfeed.tech/tags/hash.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [join](<https://devfeed.tech/tags/join.md>), [postgresql](<https://devfeed.tech/tags/postgresql.md>), [query](<https://devfeed.tech/tags/query.md>), [sql](<https://devfeed.tech/tags/sql.md>), [window-functions](<https://devfeed.tech/tags/window-functions.md>)

### AI overview

This tutorial explains how to obtain the first or last value in a grouped SQL query, focusing on PostgreSQL. It uses separate queries for account balances and the latest credit value, joins them to produce the complete account state, and discusses the resulting execution plan.

### Source excerpt

Getting the last value of a group in an aggregated query in PostgreSQL is a challenging task. In this article we present a simple way to get the first or last value of a group using group by.

## Postgres hidden gems

DevFeed: [Postgres hidden gems](<https://devfeed.tech/articles/postgres-hidden-gems-41205.md>)

Original publisher: [Read original article](<https://www.craigkerstiens.com/2018/01/31/Postgres-hidden-gems/>)

Author: Map

Published: 2018-01-31T20:55:56Z

Content type: article

Language: en

Sources: [Craig Kerstiens](<https://devfeed.tech/sources/craig-kerstiens.md>)

Topics: [PostgreSQL](<https://devfeed.tech/topics/postgresql.md>), [Database](<https://devfeed.tech/topics/database.md>), [Replication](<https://devfeed.tech/topics/replication.md>), [Network Operations](<https://devfeed.tech/topics/network-operations.md>), [Statistics](<https://devfeed.tech/topics/statistics.md>)

Tags: [functions](<https://devfeed.tech/tags/functions.md>), [jsonb](<https://devfeed.tech/tags/jsonb.md>), [lateral](<https://devfeed.tech/tags/lateral.md>), [network-operations](<https://devfeed.tech/tags/network-operations.md>), [postgres](<https://devfeed.tech/tags/postgres.md>), [postgresql](<https://devfeed.tech/tags/postgresql.md>), [psql](<https://devfeed.tech/tags/psql.md>), [replication](<https://devfeed.tech/tags/replication.md>), [statistics](<https://devfeed.tech/tags/statistics.md>), [text](<https://devfeed.tech/tags/text.md>), [unicode](<https://devfeed.tech/tags/unicode.md>), [window-functions](<https://devfeed.tech/tags/window-functions.md>)

### AI overview

The article collects PostgreSQL features that the author and contributors consider useful or easily overlooked. It highlights capabilities including ltree, citext, date arithmetic, jsonb, lateral joins, window functions, custom foreign data wrappers, replication slots, range types, statistics, logical decoding, and psql features.

### Source excerpt

Postgres has a rich set of features, even when working everyday with it you may not discover all it has to offer. In hopes of learning some new features that I didn't know about myself as well as seeing what small gems people found joy in I tweeted out to see what people came back from. The response was impressive, and rather than have it lost into ether of twitter I'm capturing some of the responses here along with some resources many of the features. @listrophy - $ brew postgresql-update database Though personally I prefer Postgres.app ;) @pat_shaugnessy - ltree Pat has a great post that walks through ltree @billyfung - citext A really handy datatype for case insensitive text @eeeebbbbrrrr - date math with intervals I couldn't agree more on this one, working with time in Postgres is the easiest time I've every had @DataMiller - The jsonb datatype and lateral joins I'd argue it's hard to claim now JSONB is a hidden gem, but lateral joins are certain a great one @ideasasylum - row_number() over(partition http://orders.site_id order by orders.created_at) Window functions are definitely a handy feature was my hidden (to me) discovery this week @franckverrot - Index access method, and custom FDWs @jonjensen0 - Set-returning functions and custom aggregate functions can be very helpful. @ascherbaum - psql -x Psql is indeed awesome and can be well tuned @Abstr_ct - The fact that the docs are fantastic and all hidden gems are actually readily available. Oh, and pl/brainfuck obviously @Halpin_IO - Subnetting and network operations @jkatz05 - Replication slots, both physical and logical. They've made setting up replication infinitely easier. And range types. Because they're awesome. @petereisentraut - Unicode table borders @_avichalp Notify/listen @simonw - The fact that GIN indices can make LIKE queries run fast even if the % isn't just at the end of the string @javisantana - it has a statistics system to plan queries that can be used by the user when accuracy does not matt

## Dear Postgres

DevFeed: [Dear Postgres](<https://devfeed.tech/articles/dear-postgres-41201.md>)

Original publisher: [Read original article](<https://www.craigkerstiens.com/2017/10/12/Dear-Postgres/>)

Author: Map

Published: 2017-10-12T20:55:56Z

Content type: opinion

Language: en

Sources: [Craig Kerstiens](<https://devfeed.tech/sources/craig-kerstiens.md>)

Topics: [Databases](<https://devfeed.tech/topics/databases.md>), [Database](<https://devfeed.tech/topics/database.md>), [data](<https://devfeed.tech/topics/data.md>), [Geographic Information System](<https://devfeed.tech/topics/gis.md>), [JSON](<https://devfeed.tech/topics/json.md>), [functions](<https://devfeed.tech/topics/functions.md>), [XML](<https://devfeed.tech/topics/xml.md>)

Tags: [b-tree](<https://devfeed.tech/tags/b-tree.md>), [database](<https://devfeed.tech/tags/database.md>), [databases](<https://devfeed.tech/tags/databases.md>), [gis](<https://devfeed.tech/tags/gis.md>), [indexes](<https://devfeed.tech/tags/indexes.md>), [json](<https://devfeed.tech/tags/json.md>), [jsonb](<https://devfeed.tech/tags/jsonb.md>), [location-based](<https://devfeed.tech/tags/location-based.md>), [postgres](<https://devfeed.tech/tags/postgres.md>), [postgresql](<https://devfeed.tech/tags/postgresql.md>), [window-functions](<https://devfeed.tech/tags/window-functions.md>)

### AI overview

An appreciative commentary on Postgres describes how it has expanded beyond traditional relational database capabilities while retaining a focus on data durability, standards, and steady improvement. The article discusses indexes, GIS and PostGIS, analytical features such as window functions and CTEs, and JSON and JSONB support.

### Source excerpt

Dear Postgres, I've always felt an affinity for you in my 9 years of working with you. I know others have known you longer, but that doesn't mean they love you more. Years ago when others complained about your rigidness or that you weren't as accommodating as others I found solace in your steadfast values: Don't lose data Adhere to standards Move forward with a balancing act between new fads of the day while still continuously improving You've been there and seen it all. Years ago you were being disrupted by XML databases. As companies made heavy investment into what such a document database would do for their organization you proceeded to "simply" add a datatype that accomplished the same and brought your years of progress along with it. In the early years you had the standard format of index b-tree that most database engines leveraged. Then quietly but confidently you started adding more. Then came K-nearest neighbor, generalized inverted indexes (GIN), and generalized search-tree (GiST), only to be followed by space partitioned GiST and block range indexes (BRIN). Now the only question is which do I use? All the while there was this other camp using for something that felt cool but outside my world: GIS. GIS, geographical information systems, I thought was something only civil engineers used. Then GPS came along, then the iPhone and location based devices came along and suddenly I wanted to find out the nearest path to my Peets, or manage geographical region for my grocery delivery service. PostGIS had been there all along building up this powerful feature set, sadly to this day I still mostly marvel from the sideline at this whole other feature set I long to take advantage of... one day... one day. A little over 5 years ago I fell in love with your fastly improving analytical capabilities. No you weren't an MPP system yet, but here came window functions and CTEs, then I almost understood recursive CTEs (still working on that one). I can iterate over data in a recurs

## Exploring a Data Set in SQL

DevFeed: [Exploring a Data Set in SQL](<https://devfeed.tech/articles/exploring-a-data-set-in-sql-34557.md>)

Original publisher: [Read original article](<https://tapoueh.org/blog/2017/06/exploring-a-data-set-in-sql/>)

Author: Dimitri Fontaine PostgreSQL Major Contributor; Author

Published: 2017-06-13T11:47:08Z

Content type: tutorial

Language: en

Sources: [Dimitri Fontaine](<https://devfeed.tech/sources/dimitri-fontaine.md>)

Topics: [SQL](<https://devfeed.tech/topics/sql.md>), [data](<https://devfeed.tech/topics/data.md>), [PostgreSQL](<https://devfeed.tech/topics/postgresql.md>), [SQLite](<https://devfeed.tech/topics/sqlite.md>), [migration](<https://devfeed.tech/topics/migration.md>)

Tags: [data](<https://devfeed.tech/tags/data.md>), [database](<https://devfeed.tech/tags/database.md>), [migration](<https://devfeed.tech/tags/migration.md>), [postgresql](<https://devfeed.tech/tags/postgresql.md>), [sql](<https://devfeed.tech/tags/sql.md>), [sqlite](<https://devfeed.tech/tags/sqlite.md>), [window-functions](<https://devfeed.tech/tags/window-functions.md>)

### AI overview

A practical exploration of the Chinook music catalog sample database using SQL and PostgreSQL. The article examines schema relationships, queries album and track data, and uses window functions to calculate rolling duration, size, and bytes-per-second aggregates.

### Source excerpt

Sometimes you need to dive in an existing data set that you know very little about. Let's say we've been lucky to have had a high level description of the business case covered by a database, and then access to it. Our next step is figuring out data organisation, content and quality. Our tool box: the world's most advanced open source database, PostgreSQL, and its Structured Query Language, SQL.

## Moving past averages in SQL (Postgres) - Percentiles

DevFeed: [Moving past averages in SQL (Postgres) - Percentiles](<https://devfeed.tech/articles/moving-past-averages-in-sql-postgres-percentiles-41177.md>)

Original publisher: [Read original article](<https://www.craigkerstiens.com/2015/06/07/Moving-past-averages-in-SQL-Postgres-Percentiles/>)

Author: Map

Published: 2015-06-07T20:55:56Z

Content type: tutorial

Language: en

Sources: [Craig Kerstiens](<https://devfeed.tech/sources/craig-kerstiens.md>)

Topics: [SQL](<https://devfeed.tech/topics/sql.md>), [data](<https://devfeed.tech/topics/data.md>)

Tags: [postgres](<https://devfeed.tech/tags/postgres.md>), [processing](<https://devfeed.tech/tags/processing.md>), [rank](<https://devfeed.tech/tags/rank.md>), [sql](<https://devfeed.tech/tags/sql.md>), [window](<https://devfeed.tech/tags/window.md>), [window-functions](<https://devfeed.tech/tags/window-functions.md>)

### AI overview

This tutorial explains why medians and percentiles can provide more useful insight than averages when analyzing metrics in Postgres. It demonstrates using window functions, ntile, and ordered set functions to calculate percentile rankings directly in SQL.

### Source excerpt

Often when you're tracking a metric for the first time you take a look at your average. For example what is your ARPU - Average Revenue Per User. In theory this tells you if you can acquire new user how much you'll make off that user. Or maybe what's your average life time value of a customer. Yet, many that are more familiar looking and extracting meaning from data median or a few different looks at percentiles can be much more meaningful. And while you can very easily get the AVG in Postgres, with a small amount more effort you can report on percentiles as well. Window functions have been around for some time in Postgres. They allow you to order your result set over a certain group. The most basic example is if you want to order by date, but know which one falls at place 10 in order you can use a window function and project out the rank(). Beyond outputting the rank yourself and doing extra manipulation Postgres has some great utilities to make the most common uses even easier. Being able to compute things such as the perc 95 directly on the data, or lay out for every record in the result where it falls within a percentile is hugely useful. Let's take a look: Assuming you have a table called purchases, which has a total in it we could try: SELECT id, total, ntile(100) OVER (ORDER BY total) AS perc_rank FROM purchases This would give us something like: id | total | perc_rank ----------|---------|----------- 264 | 12034 | 100 643 | 11830 | 100 ... ... 304 | 751 | 95 What this would tell us is we have less than 5% of our purchases that have a total over 751. From here you can start to dig in and extract all sorts of different meanings, and by doing directly in SQL you're closer to the data and have one less processing step. Percentiles get even more fun with the ordered set functions that came out in Postgres 9.4. They even allow you to project out hypothetical values in certain cases. For now I'd encourage adding ntile to your toolbox anytime you're analyzing averag

## Nordic PostgreSQL Day 2015

DevFeed: [Nordic PostgreSQL Day 2015](<https://devfeed.tech/articles/nordic-postgresql-day-2015-34636.md>)

Original publisher: [Read original article](<https://tapoueh.org/conf/nordic-postgresql-day-2015/>)

Published: 2015-03-16T14:50:00Z

Content type: article

Language: en

Sources: [Dimitri Fontaine](<https://devfeed.tech/sources/dimitri-fontaine.md>)

Topics: [PostgreSQL](<https://devfeed.tech/topics/postgresql.md>), [SQL](<https://devfeed.tech/topics/sql.md>), [Open Source](<https://devfeed.tech/topics/open-source.md>)

Tags: [developers](<https://devfeed.tech/tags/developers.md>), [internals](<https://devfeed.tech/tags/internals.md>), [jsonb](<https://devfeed.tech/tags/jsonb.md>), [learn](<https://devfeed.tech/tags/learn.md>), [open-source](<https://devfeed.tech/tags/open-source.md>), [planner](<https://devfeed.tech/tags/planner.md>), [postgresql](<https://devfeed.tech/tags/postgresql.md>), [sql](<https://devfeed.tech/tags/sql.md>), [window-functions](<https://devfeed.tech/tags/window-functions.md>)

### AI overview

Nordic PostgreSQL Day 2015 is presented as a conference opportunity for developers and PostgreSQL users. The featured PostgreSQL for Developers talk covers solving a use case in SQL, SQL window functions, ranges, JSONB capabilities, and query planner internals.

### Source excerpt

The PostgreSQL for Developers talk begins with a simple use case for developers to solve entirely in SQL. Discover SQL window functions if you don't know them already, and then see about advanced PostgreSQL stuff such as ranges.

## PGConf NYC 2014

DevFeed: [PGConf NYC 2014](<https://devfeed.tech/articles/pgconf-nyc-2014-34641.md>)

Original publisher: [Read original article](<https://tapoueh.org/conf/pgconf-nyc-2014/>)

Published: 2014-04-02T22:00:00Z

Content type: article

Language: en

Sources: [Dimitri Fontaine](<https://devfeed.tech/sources/dimitri-fontaine.md>)

Topics: [PostgreSQL](<https://devfeed.tech/topics/postgresql.md>), [SQL](<https://devfeed.tech/topics/sql.md>), [Databases](<https://devfeed.tech/topics/databases.md>), [Structured-data](<https://devfeed.tech/topics/structured-data.md>)

Tags: [adoption](<https://devfeed.tech/tags/adoption.md>), [awareness](<https://devfeed.tech/tags/awareness.md>), [community](<https://devfeed.tech/tags/community.md>), [conference](<https://devfeed.tech/tags/conference.md>), [developers](<https://devfeed.tech/tags/developers.md>), [env-file-security](<https://devfeed.tech/tags/env-file-security.md>), [postgresql](<https://devfeed.tech/tags/postgresql.md>), [resources](<https://devfeed.tech/tags/resources.md>), [sql](<https://devfeed.tech/tags/sql.md>), [training](<https://devfeed.tech/tags/training.md>), [window-functions](<https://devfeed.tech/tags/window-functions.md>)

### AI overview

This conference page describes a PostgreSQL for Developers talk covering a SQL use case, SQL window functions, and advanced PostgreSQL features such as ranges.

### Source excerpt

The PostgreSQL for Developers talk begins with a simple use case for developers to solve entirely in SQL. Discover SQL window functions if you don't know them already, and then see about advanced PostgreSQL stuff such as ranges.

## Understanding Window Functions

DevFeed: [Understanding Window Functions](<https://devfeed.tech/articles/understanding-window-functions-34517.md>)

Original publisher: [Read original article](<https://tapoueh.org/blog/2013/08/understanding-window-functions/>)

Author: Dimitri Fontaine PostgreSQL Major Contributor; Author

Published: 2013-08-20T10:04:00Z

Content type: tutorial

Language: en

Sources: [Dimitri Fontaine](<https://devfeed.tech/sources/dimitri-fontaine.md>)

Topics: [SQL](<https://devfeed.tech/topics/sql.md>), [PostgreSQL](<https://devfeed.tech/topics/postgresql.md>), [Query (disambiguation)](<https://devfeed.tech/topics/query.md>), [Databases](<https://devfeed.tech/topics/databases.md>)

Tags: [aggregate](<https://devfeed.tech/tags/aggregate.md>), [array-agg](<https://devfeed.tech/tags/array-agg.md>), [article](<https://devfeed.tech/tags/article.md>), [database](<https://devfeed.tech/tags/database.md>), [functions](<https://devfeed.tech/tags/functions.md>), [partitioning](<https://devfeed.tech/tags/partitioning.md>), [postgresql](<https://devfeed.tech/tags/postgresql.md>), [query](<https://devfeed.tech/tags/query.md>), [sql](<https://devfeed.tech/tags/sql.md>), [window-functions](<https://devfeed.tech/tags/window-functions.md>)

### AI overview

A tutorial explaining SQL window functions, including window frames, aggregate calculations, partitioning, and practical examples using PostgreSQL and motor racing data.

### Source excerpt

There was SQL before window functions and SQL after window functions: that's how powerful this tool is. Being that of a deal breaker unfortunately means that it can be quite hard to grasp the feature. This article aims at making it crystal clear so that you can begin using it today and are able to reason about it and recognize cases where you want to be using window functions. *We see a part of the data as if through a little window*

## Making the Most of SQL with PostgreSQL

DevFeed: [Making the Most of SQL with PostgreSQL](<https://devfeed.tech/articles/make-the-most-ouf-of-sql-34508.md>)

Original publisher: [Read original article](<https://tapoueh.org/blog/2013/07/make-the-most-ouf-of-sql/>)

Author: Dimitri Fontaine PostgreSQL Major Contributor; Author

Published: 2013-07-02T20:22:00Z

Content type: article

Language: en

Sources: [Dimitri Fontaine](<https://devfeed.tech/sources/dimitri-fontaine.md>)

Topics: [PostgreSQL](<https://devfeed.tech/topics/postgresql.md>), [SQL](<https://devfeed.tech/topics/sql.md>), [Databases](<https://devfeed.tech/topics/databases.md>)

Tags: [developer](<https://devfeed.tech/tags/developer.md>), [postgresql](<https://devfeed.tech/tags/postgresql.md>), [sql](<https://devfeed.tech/tags/sql.md>), [talk](<https://devfeed.tech/tags/talk.md>), [window-functions](<https://devfeed.tech/tags/window-functions.md>)

### AI overview

The article describes a talk for the Dublin PostgreSQL User Group about using SQL with PostgreSQL as a developer. It demonstrates solving an application example in SQL with window functions and common table expressions, and notes that a recording was published online.

### Source excerpt

Tonight I had the pleasure to present a talk at the Dublin PostgreSQL User Group using remote technologies. The talk is about how to make the most ouf of PostgreSQL when using SQL as a developer, and tries to convince you to dive into mastering SQL by showing how to solve an application example all in SQL, using window functions and common table expressions. *PostgreSQL for developer* And using remote technologies, the presentation have been recorded and made available on the internet:

## Présentation de PostgreSQL

DevFeed: [Présentation de PostgreSQL](<https://devfeed.tech/articles/presentation-de-postgresql-34660.md>)

Original publisher: [Read original article](<https://tapoueh.org/conf/pr%C3%A9sentation-de-postgresql/>)

Published: 2012-10-30T23:00:00Z

Content type: article

Language: en

Sources: [Dimitri Fontaine](<https://devfeed.tech/sources/dimitri-fontaine.md>)

Topics: [PostgreSQL](<https://devfeed.tech/topics/postgresql.md>), [SQL](<https://devfeed.tech/topics/sql.md>)

Tags: [advanced](<https://devfeed.tech/tags/advanced.md>), [developers](<https://devfeed.tech/tags/developers.md>), [sql](<https://devfeed.tech/tags/sql.md>), [window-functions](<https://devfeed.tech/tags/window-functions.md>)

### AI overview

A PostgreSQL for Developers talk presents a simple use case solved entirely in SQL, introduces SQL window functions, and discusses advanced PostgreSQL features such as ranges.

### Source excerpt

The PostgreSQL for Developers talk begins with a simple use case for developers to solve entirely in SQL. Discover SQL window functions if you don't know them already, and then see about advanced PostgreSQL stuff such as ranges.

## Reset Counter

DevFeed: [Reset Counter](<https://devfeed.tech/articles/reset-counter-34477.md>)

Original publisher: [Read original article](<https://tapoueh.org/blog/2012/10/reset-counter/>)

Author: Dimitri Fontaine PostgreSQL Major Contributor; Author

Published: 2012-10-05T07:44:00Z

Content type: tutorial

Language: en

Sources: [Dimitri Fontaine](<https://devfeed.tech/sources/dimitri-fontaine.md>)

Topics: [PostgreSQL](<https://devfeed.tech/topics/postgresql.md>), [Sequences](<https://devfeed.tech/topics/sequences.md>), [data](<https://devfeed.tech/topics/data.md>)

Tags: [article](<https://devfeed.tech/tags/article.md>), [blog](<https://devfeed.tech/tags/blog.md>), [postgresql](<https://devfeed.tech/tags/postgresql.md>), [query](<https://devfeed.tech/tags/query.md>), [sequences](<https://devfeed.tech/tags/sequences.md>), [window-functions](<https://devfeed.tech/tags/window-functions.md>)

### AI overview

A technical walkthrough for calculating the logical value of an ever-increasing counter that periodically resets. It models timestamped measurements and uses PostgreSQL window functions to identify counter wraparounds and retain the relevant values.

### Source excerpt

I've been given a nice puzzle that I think is a good blog article opportunity, as it involves some thinking and window functions.

## Reasons to Use Postgres

DevFeed: [Reasons to Use Postgres](<https://devfeed.tech/articles/why-postgres-41111.md>)

Original publisher: [Read original article](<https://www.craigkerstiens.com/2012/04/30/Why-Postgres/>)

Author: Map

Published: 2012-04-30T20:55:56Z

Content type: opinion

Language: en

Sources: [Craig Kerstiens](<https://devfeed.tech/sources/craig-kerstiens.md>)

Topics: [Databases](<https://devfeed.tech/topics/databases.md>), [Replication](<https://devfeed.tech/topics/replication.md>), [functions](<https://devfeed.tech/topics/functions.md>), [SQL](<https://devfeed.tech/topics/sql.md>)

Tags: [array-agg](<https://devfeed.tech/tags/array-agg.md>), [database](<https://devfeed.tech/tags/database.md>), [development](<https://devfeed.tech/tags/development.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [mysql](<https://devfeed.tech/tags/mysql.md>), [postgres](<https://devfeed.tech/tags/postgres.md>), [replication](<https://devfeed.tech/tags/replication.md>), [sql](<https://devfeed.tech/tags/sql.md>), [window-functions](<https://devfeed.tech/tags/window-functions.md>)

### AI overview

This article presents reasons to use Postgres, including improved replication, window functions, flexible data types such as arrays, built-in functions, custom languages, and extensions. It also contrasts some capabilities with MySQL, Oracle, and SQL Server.

### Source excerpt

This post is a list of many of the reasons to use Postgres, much this content as well as how to use these features will later be curated within PostgresGuide.com. If you need to get started check out Postgres.app for Mac, or get a Cloud instance at Heroku Postgres for free UPDATE: A part 2 has been posted on Why Use Postgres Very often recently I find myself explaining why Postgres is so great. In an effort to save myself a bit of time in repeating this, I though it best to consolidate why Postgres is so great and dispel some of the historical arguments against it. Replication For some time the biggest argument for MySQL over Postgres was the lack of a good replication story for Postgres. With the release of 8.4 Postgres's story around replication quickly became much better. While replication is indeed very important, are users actually setting up replication each time with MySQL or is it to only have the option later? Window functions This is a feature those familiar with Oracle greatly missed in Postgres. In fact even SQL Server had some form of them, though it was with T-SQL, which adds a bit more complexity to the feature. This is a feature that once you have you can't live without; the other options that existed before were slower and much more complicated. With the release of 8.4 window functions were added to bring Postgres on par with Oracle in this area. For more info on using them check the Postgres docs above or PostgresGuide.com. Flexible Datatypes Creating a custom column is simpler in Postgres than any other database I've used by far. Excluding custom datatypes, even Postgres's out of the box datatypes make Postgres stand out far ahead of other databases. In particular the ability to create a column as an Array of some datatype. Want to store a game of tic-tac-toe in a database, or an array of 1 user's phone numbers? It simply becomes a single column that can contain multiple phone numbers for a user. Functions Need to do some logic outside of standard

## Window Functions example remix

DevFeed: [Window Functions example remix](<https://devfeed.tech/articles/window-functions-example-remix-34393.md>)

Original publisher: [Read original article](<https://tapoueh.org/blog/2010/09/window-functions-example-remix/>)

Author: Dimitri Fontaine PostgreSQL Major Contributor; Author

Published: 2010-09-12T19:35:00Z

Content type: article

Language: en

Sources: [Dimitri Fontaine](<https://devfeed.tech/sources/dimitri-fontaine.md>)

Topics: [SQL](<https://devfeed.tech/topics/sql.md>), [Structured-data](<https://devfeed.tech/topics/structured-data.md>)

Tags: [sql](<https://devfeed.tech/tags/sql.md>), [window-functions](<https://devfeed.tech/tags/window-functions.md>)

### AI overview

A follow-up to a previous SQL entry presents David Fetter's rewrite of a window-functions example. The rewrite filters the first change in a subquery rather than removing it at the outer level; the author is unsure which approach is cleaner but considers one simpler.

### Source excerpt

The drawback of hosting a static only website is, obviously, the lack of comments. What happens actually, though, is that I receive very few comments by direct mail. As I don't get another spam source to cleanup, I'm left unconvinced that's such a drawback. I still miss the low probability of seeing blog readers exchange directly, but I think a tapoueh.org mailing list would be my answer, here... Anyway, David Fetter took the time to send me a comment by mail with a cleaned up rewrite of the previous entry SQL, here's it for your pleasure!

## Window Functions example

DevFeed: [Window Functions example](<https://devfeed.tech/articles/window-functions-example-34394.md>)

Original publisher: [Read original article](<https://tapoueh.org/blog/2010/09/window-functions-example/>)

Author: Dimitri Fontaine PostgreSQL Major Contributor; Author

Published: 2010-09-09T14:35:00Z

Content type: tutorial

Language: en

Sources: [Dimitri Fontaine](<https://devfeed.tech/sources/dimitri-fontaine.md>)

Topics: [SQL](<https://devfeed.tech/topics/sql.md>), [Query (disambiguation)](<https://devfeed.tech/topics/query.md>), [ordering](<https://devfeed.tech/topics/ordering.md>), [function](<https://devfeed.tech/topics/function.md>)

Tags: [function](<https://devfeed.tech/tags/function.md>), [ordering](<https://devfeed.tech/tags/ordering.md>), [partitioning](<https://devfeed.tech/tags/partitioning.md>), [query](<https://devfeed.tech/tags/query.md>), [sql](<https://devfeed.tech/tags/sql.md>), [window-functions](<https://devfeed.tech/tags/window-functions.md>)

### AI overview

This tutorial demonstrates how SQL window functions can identify changes in a column by comparing ordered rows with preceding values. It also discusses an initial false change and how to accommodate it.

### Source excerpt

So, when 8.4 came out there was all those comments about how getting window functions was an awesome addition. Now, it seems that a lot of people seeking for help in #postgresql just don't know what kind of problem this feature helps solving. I've already been using them in some cases here in this blog, for getting some nice overview about Partitioning: relation size per "group". *That's another way to count change* Now, another example use case rose on IRC today. I'll quote directly our user here:

## Partitioning: relation size per "group"

DevFeed: [Partitioning: relation size per "group"](<https://devfeed.tech/articles/partitioning-relation-size-per-group-34375.md>)

Original publisher: [Read original article](<https://tapoueh.org/blog/2010/07/partitioning-relation-size-per-group/>)

Author: Dimitri Fontaine PostgreSQL Major Contributor; Author

Published: 2010-07-26T15:00:00Z

Content type: tutorial

Language: en

Sources: [Dimitri Fontaine](<https://devfeed.tech/sources/dimitri-fontaine.md>)

Topics: [Structured-data](<https://devfeed.tech/topics/structured-data.md>)

Tags: [partition](<https://devfeed.tech/tags/partition.md>), [partitioning](<https://devfeed.tech/tags/partitioning.md>), [partitions](<https://devfeed.tech/tags/partitions.md>), [schema](<https://devfeed.tech/tags/schema.md>), [table](<https://devfeed.tech/tags/table.md>), [window-functions](<https://devfeed.tech/tags/window-functions.md>)

### AI overview

A PostgreSQL-focused tutorial presents queries for aggregating disk usage across DDL-partitioned tables by partition set. It also discusses detailed table and index usage views and using window functions to compare historical partition-size changes.

### Source excerpt

This time, we are trying to figure out where is the bulk of the data on disk. The trick is that we're using DDL partitioning, but we want a "nice" view of size per partition set. Meaning that if you have for example a parent table foo with partitions foo_201006 and foo_201007, you would want to see a single category foo containing the accumulated size of all the partitions underneath foo.