FIRST_VALUE() Window Function – with example in PostgreSQL.

With Window Functions, there is always something to learn. They have numerous moving parts but allow for powerful queries that return powerful results. I recently learned of (new to me, but not new to the SQL world) another interesting Window Function, FIRST_VALUE(). Read on as I explore more about it…

[Head this way for great PostgresSQL blogging >>>]
Advertisements

Searched CASE expression in PostgreSQL – with examples.

In this blog post, we will look at one type of ‘conditional formatting’ that enables you to perform complex calculations. PostgreSQL (and SQL in general) provides us with a couple of variants of the CASE statement which could be used for this very thing, among many many others. Learn with me as I make my way through writing this post…

[Head this way for great PostgresSQL blogging >>>]

Handy string functions: right() and left() with examples in PostgreSQL

In this blog post, I will visit a couple of handy string functions for extracting a specified number of characters from a string of text. Yet, with both functions, you can start from a certain position. Either left (beginning) or right (the end). Let’s see them in action with some examples…

[Head this way for great PostgresSQL blogging >>>]

ROWS and RANGE: Windowing clause defaults – learning by example in MySQL.

The more I dive into Window Functions, at least 2 things are very apparent to me: 1) They are incredibly powerful, 2) I have a long ways to go with wrapping my head around them. I recently wrote, The PARTITION BY clause of a Window Function – with an example in MySQL where I built upon a base Window Function query with the PARTITION BY clause. However, in this post, I want to return to and explore, some defaults going on behind the scenes in that query in regards to the windowing portion.

[Head this way for great MySQL blogging >>>]

The PARTITION BY clause of a Window Function – with an example in MySQL.

In this blog post, I will look at a couple of interesting result sets using the PARTITION BY clause as part of the OVER() clause of a Window Function with an example using MySQL.

[Head this way for great MySQL blogging >>>]